mirror of
https://github.com/nmap/nmap.git
synced 2025-12-16 12:49:02 +00:00
Make ncat --output logging work in UDP mode.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
# Nmap Changelog ($Id$); -*-text-*-
|
# Nmap Changelog ($Id$); -*-text-*-
|
||||||
|
|
||||||
|
o [Ncat] --output logging now works in UDP mode. Thanks to Michal
|
||||||
|
Hlavinka for reporting the bug. [David Fifield]
|
||||||
|
|
||||||
o [NSE] Added pcanywhere-brute script which bruteforces pcAnywhere server
|
o [NSE] Added pcanywhere-brute script which bruteforces pcAnywhere server
|
||||||
for valid logins. [Aleksandar Nikolic]
|
for valid logins. [Aleksandar Nikolic]
|
||||||
|
|
||||||
|
|||||||
@@ -673,7 +673,8 @@ static int ncat_listen_dgram(int proto)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Dump the current datagram */
|
/* Dump the current datagram */
|
||||||
Recv(socket_n, buf, sizeof(buf), 0);
|
nbytes = Recv(socket_n, buf, sizeof(buf), 0);
|
||||||
|
ncat_log_recv(buf, nbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o.debug > 1)
|
if (o.debug > 1)
|
||||||
@@ -732,6 +733,7 @@ static int ncat_listen_dgram(int proto)
|
|||||||
send(socket_n, tempbuf, nbytes, 0);
|
send(socket_n, tempbuf, nbytes, 0);
|
||||||
else
|
else
|
||||||
send(socket_n, buf, nbytes, 0);
|
send(socket_n, buf, nbytes, 0);
|
||||||
|
ncat_log_send(buf, nbytes);
|
||||||
}
|
}
|
||||||
if (tempbuf != NULL) {
|
if (tempbuf != NULL) {
|
||||||
free(tempbuf);
|
free(tempbuf);
|
||||||
@@ -745,6 +747,7 @@ static int ncat_listen_dgram(int proto)
|
|||||||
close(socket_n);
|
close(socket_n);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
ncat_log_recv(buf, nbytes);
|
||||||
if (!o.sendonly)
|
if (!o.sendonly)
|
||||||
Write(STDOUT_FILENO, buf, nbytes);
|
Write(STDOUT_FILENO, buf, nbytes);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user