nmap

Stop a code if a nmap port is opened in python

Stop a code if a nmap port is opened in python Question: I got this code that executes a nmap port scan: #iimport nmap library import nmap #create scanner scanner = nmap.PortScanner() #scan ip and ports 111, 2049 scanner.scan(‘10.129.223.105’, ‘111,2049’) #print port 111 status print(‘Port 111 Status:’, scanner[10.129.223.105][‘tcp’][111][‘state’]) #print port 2049 status print(‘Port 2049 Status:’, …

Total answers: 1

Error import nmap into python

Error import nmap into python Question: I installed nmap module for python. While i was importing nmap,it received error. This error is attribute error. Command line: root@harun:~/Desktop# python nmap.py Traceback (most recent call last): File “nmap.py”, line 2, in <module> import nmap File “/root/Desktop/nmap.py”, line 3, in <module> nm = nmap.PortScanner() AttributeError: ‘module’ object has …

Total answers: 2