-
Notifications
You must be signed in to change notification settings - Fork 74
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
parse_noportscan does not parse mac address #30
Comments
That's a flaw then, will work on that, if possible you can fix it and create a pull request. |
This issue has been fixed, try again and you will get all addresses. |
Not all entries have a hostname. Why not use something like xmljson to directly convert the xml from nmap to json ? |
We'll fix that, but you can always open a pull request with those changes you are recommendint |
You can try again and let us know before we close the issue. |
Looks good to me now. Thanks. |
I'm having a bit of trouble getting the mac at all from this library so I'd like to piggy back off this issue. Running this library's ExamplesExample nmap output (censored):
Example script: # test.py
import nmap3
nmap = nmap3.NmapHostDiscovery()
results = nmap.nmap_no_portscan("192.168.1.10")
print(results) Example output ( {
"runtime": {
"time": "1602865359",
"timestr": "Fri Oct 16 17:22:39 2020",
"elapsed": "0.58",
"summary": "Nmap done at Fri Oct 16 17:22:39 2020; 1 IP address (1 host up) scanned in 0.58 seconds",
"exit": "success"
},
"status": {
"up": "1",
"down": "0",
"total": "1"
},
"hosts": [
{
"state": "up",
"reason": "arp-response",
"reason_ttl": "0",
"addr": "192.168.1.10",
"addrtype": "ipv4"
}
]
} |
Mac addresses are shown as IP addresses that's why there is that iteration |
Seems we need to look into it again, i will still polish that out. and i will update this issue. |
Mac addresses are detected when the script runs as root, but when the script does not run as root mac addresses will not be shown.
Without root
|
I have observed the same behavior with Is there some other function I need to use, am I somehow using sudo wrong? I get the impression it's just a usability issue since I seem to be the only one having this problem :D |
Addtionally there is not guarantee that the MAC Address will be returned, I scanned two IP, but only one returned the Mac address the other never returned the MAC Address. The one that returned the MAC address was the router IP(Gate way IP). The one that didn't return the MAC address was a physical linux computer. |
Hmm, that's odd. I have been able to consistently get mac addresses with |
You can not turn on debug, but you can get raw xml and see if it's returned and it's a parsing issue with
|
Great, I was able to see the mac in the XML, so it's the same problem that egabrum reported in this ticket originally. Thank you for your help! |
That's great, if you can fix that so it works and open a pull requests, so all can benefit. |
I'm trying to use this package to find the IP, knowing the MAC address, but...
This data:
Is only parsed as:
{'state': 'up', 'reason': 'arp-response', 'reason_ttl': '0', 'addr': '10.11.12.13', 'addrtype': 'ipv4'}
The text was updated successfully, but these errors were encountered: