mirror of
https://github.com/nmap/nmap.git
synced 2026-06-25 10:38:02 +00:00
Make ncat --output logging work in UDP mode.
This commit is contained in:
parent
9e553a2203
commit
a9a621f5bd
2 changed files with 7 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
|||
# 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
|
||||
for valid logins. [Aleksandar Nikolic]
|
||||
|
||||
|
|
|
|||
|
|
@ -673,7 +673,8 @@ static int ncat_listen_dgram(int proto)
|
|||
}
|
||||
|
||||
/* 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)
|
||||
|
|
@ -732,6 +733,7 @@ static int ncat_listen_dgram(int proto)
|
|||
send(socket_n, tempbuf, nbytes, 0);
|
||||
else
|
||||
send(socket_n, buf, nbytes, 0);
|
||||
ncat_log_send(buf, nbytes);
|
||||
}
|
||||
if (tempbuf != NULL) {
|
||||
free(tempbuf);
|
||||
|
|
@ -745,6 +747,7 @@ static int ncat_listen_dgram(int proto)
|
|||
close(socket_n);
|
||||
return 1;
|
||||
}
|
||||
ncat_log_recv(buf, nbytes);
|
||||
if (!o.sendonly)
|
||||
Write(STDOUT_FILENO, buf, nbytes);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue