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:’, …