MCPcopy Index your code
hub / github.com/geekcomputers/Python / nmapScan

Function nmapScan

nmap_scan.py:17–21  ·  view source on GitHub ↗
(tgtHost, tgtPort)

Source from the content-addressed store, hash-verified

15
16
17def nmapScan(tgtHost, tgtPort): # Create the function, this fucntion does the scanning
18 nmScan = nmap.PortScanner()
19 nmScan.scan(tgtHost, tgtPort)
20 state = nmScan[tgtHost]["tcp"][int(tgtPort)]["state"]
21 print("[*] " + tgtHost + " tcp/" + tgtPort + " " + state)
22
23
24def main(): # Main Program

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected