Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nmap --resume gets confused by IPv6 and MAC addresses #1680

Open
dmiller-nmap opened this issue Aug 8, 2019 · 0 comments

Comments

@dmiller-nmap
Copy link

commented Aug 8, 2019

The code for --resume in main.cc tries to parse a XML file by looking for the last occurrence of "<address addr=" and parsing what follows as an IPv4 address (inet_pton(AF_INET, found, &lastip)). The code for Grepable and Normal output files does something similar. In all cases, this will fail for IPv6 addresses. In the case of XML files, it will also fail for MAC addresses (test with --max-hostgroup 1 to make it easy to interrupt a local LAN scan).

We need to parse the command line of the original scan to determine the address family (-6 means IPv6) to use with inet_pton. Additionally, for XML, we need to check that the addrtype is not "mac".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.