mirror of
https://github.com/nmap/nmap.git
synced 2025-12-27 18:09:01 +00:00
Replaced nmap's hex dump functions with new hexdump() included in nbase. Before
Nmap used two functions: one of them, hdump(), just printed raw hex bytes
(no ASCII equivalents) and the other one, lamont_hdump() had a bug when
printing buffers where bufflen%16==3. A new function has been implemented
from scratch, that basically produces the same output as Wireshark.
Output looks like this:
0000 e8 60 65 86 d7 86 6d 30 35 97 54 87 ff 67 05 9e .`e...m05.T..g..
0010 07 5a 98 c0 ea ad 50 d2 62 4f 7b ff e1 34 f8 fc .Z....P.bO{..4..
0020 c4 84 0a 6a 39 ad 3c 10 63 b2 22 c4 24 40 f4 b1 ...j9.<.c.".$@..
Changes:
- The new hexdump() function has been added to nbase.
- Old hdump() and lamont_dump() have been removed from nmap's code.
- A wrapper to the new hexdump(), called nmap_hexdump(), has been added
to nmap's utils.cc. The wrapper basically prints the buffer returned
by hexdump() using nmap's log_write() function.
This commit is contained in:
@@ -317,7 +317,7 @@ int send_rpc_query(Target *target_host, unsigned short portno,
|
||||
/* Simply send this sucker we have created ... */
|
||||
do {
|
||||
if (o.debugging > 1)
|
||||
hdump((unsigned char *) rpch, sizeof(struct rpc_hdr));
|
||||
nmap_hexdump((unsigned char *) rpch, sizeof(struct rpc_hdr));
|
||||
res = sendto(udp_rpc_socket, (char *)rpch, sizeof(struct rpc_hdr), 0,
|
||||
(struct sockaddr *) &sock, socklen);
|
||||
if (res == -1)
|
||||
|
||||
Reference in New Issue
Block a user