Created
March 7, 2013 18:57
-
-
Save brianteachman/5110715 to your computer and use it in GitHub Desktop.
Quick port scan script in python using python-nmap.
This file contains 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
# http://xael.org/norman/python/python-nmap | |
# lets check for common ports using nmap | |
import nmap | |
nmScan = nmap.PortScanner() | |
nmScan.scan('127.0.0.1', '0-1023') | |
for port in nmScan['127.0.0.1']['tcp']: | |
thisDict = nmScan['127.0.0.1']['tcp'][port] | |
print 'Port ' + str(port) + ': ' + thisDict['product'] + ', v' + thisDict['version'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!!!