Created
May 25, 2020 05:11
-
-
Save noslin005/7b15e6d75ce005c5449d76622f894d6e to your computer and use it in GitHub Desktop.
scan network using nmap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import nmap | |
target_mac = '<Enter MAC Adress>' | |
nm = nmap.PortScanner() | |
nm.scan(hosts='10.0.0.0/24', arguments='-n -sP') | |
host_list = nm.all_hosts() | |
for host in host_list: | |
if 'mac' in nm[host]['addresses']: | |
print(host+' : '+nm[host]['addresses']['mac']) | |
if target_mac == nm[host]['addresses']['mac']: | |
print('Target Found') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment