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
Ping scan doesn't return mac address #43
Comments
Try running as root! |
Unfortunately it seems not all hosts return mac addresses |
All the hosts return a mac address if i run the nmap command myself, but they are not returned by the nmap_ping_scan function |
I had the same (and a couple more) issues, In fact the xml parsing from the cli is not conform to the nmap DTD. You might want to use https://github.com/f-froehlich/nmap-scan. Note that you don't need root privileges to get the mac address and also you should never run a python script as root, if it's not really needed (which is not the case here) |
Try to use the latest changes from this repo not pip. There was a pull request #42 that fixed the mac addresses issue. |
It so happens that you can't get mac address when you are not root. Also with Nmap you can't get the mac address of a remote machine https://stackoverflow.com/questions/13212187/is-it-possible-to-get-the-mac-address-for-machine-using-nmap. If you run ping scan Here is a sample(without root)
Another sample(With root)
The same applies to this script when you run ping_scan with root it will return mac addresses
Without root privileges you won't get mac addresses
|
Hello,
When i execute the function
nmap.nmap_ping_scan('192.168.1.0/24')
, all hosts (50) have a "None" value as their mac address.If i run the command
/usr/bin/nmap -oX - -sP 192.168.1.0/24
, i get the same results, no mac address.But if i run this same command in sudo, i get the mac address.
Is there a parameter to run this command in sudo ?
Thanks you
The text was updated successfully, but these errors were encountered: