mirror of
https://github.com/nmap/nmap.git
synced 2026-01-06 06:29:03 +00:00
Moved variable definitions to the beginning of the block
This commit is contained in:
@@ -615,7 +615,11 @@ static int do_proxy_socks5(void)
|
||||
unsigned short proxyport = htons(o.portno);
|
||||
char socksbuf[8];
|
||||
int sd,len,lenfqdn;
|
||||
|
||||
struct socks5_request socks5msg2;
|
||||
struct socks5_auth socks5auth;
|
||||
char *proxy_auth;
|
||||
char *username;
|
||||
char *password;
|
||||
|
||||
sd = do_connect(SOCK_STREAM);
|
||||
if (sd == -1) {
|
||||
@@ -688,9 +692,6 @@ static int do_proxy_socks5(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
char *proxy_auth;
|
||||
char *username, *password;
|
||||
|
||||
/* Split up the proxy auth argument. */
|
||||
proxy_auth = Strdup(o.proxy_auth);
|
||||
username = strtok(proxy_auth, ":");
|
||||
@@ -716,7 +717,6 @@ static int do_proxy_socks5(void)
|
||||
* 0x00 = success
|
||||
* any other value = failure, connection must be closed
|
||||
*/
|
||||
struct socks5_auth socks5auth;
|
||||
|
||||
socks5auth.ver = 1;
|
||||
socks5auth.data[0] = strlen(username);
|
||||
@@ -753,8 +753,6 @@ static int do_proxy_socks5(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct socks5_request socks5msg2;
|
||||
|
||||
zmem(&socks5msg2,sizeof(socks5msg2));
|
||||
socks5msg2.ver = SOCKS5_VERSION;
|
||||
socks5msg2.cmd = SOCKS_CONNECT;
|
||||
|
||||
Reference in New Issue
Block a user