Portscan
Port scan
Project Address: Https://github.com/sgjr/portScan
Notice of Use
Need to install NMAP command and Python-nmap module before use
yum install nmappip install python-nmap
How to use
Usage: portScan.py [Options]Options: --version show program‘s version number and exit -h, --help show this help message and exit -H SCANHOST, --host=SCANHOST The hosts will be scan -p SCANPORT, --port=SCANPORT The ports will be scan
Using the example
1.python portscan.py-h 127.0.0.1-p 3306
----- 127.0.0.1 -----127.0.0.1 tcp/3306 open
2.python portscan.py-h 127.0.0.1-p 3306-3308
----- 127.0.0.1 -----127.0.0.1 tcp/3306 open127.0.0.1 tcp/3307 open127.0.0.1 tcp/3308 closed
3.python portscan.py-h 127.0.0.1-p 3306,3309
----- 127.0.0.1 -----127.0.0.1 tcp/3306 open127.0.0.1 tcp/3309 closed
4.python portscan.py-h 127.0.0.1-2-P 3306-3308
----- 127.0.0.1 -----127.0.0.1 tcp/3306 open127.0.0.1 tcp/3307 open127.0.0.1 tcp/3308 closed ----- 127.0.0.2 -----127.0.0.2 tcp/3306 open127.0.0.2 tcp/3307 open127.0.0.2 tcp/3308 closed
Scanning port scripts using the Python-nmap module