我在ubuntu中使用python2。刚开始阅读 nmap 的文档。仅使用 PortScanner 后出现错误。
>>> import nmap
>>> nm = nmap.PortScanner()
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
nm = nmap.PortScanner()
File "usr/local/lib/python2.7/dist-packages/nmap/nmap.py", line 118, in __init__
p = subprocess.Popen(['nmap', '-V'], bufsize=1000, stdotut=subprocess.PIPE)
File "usr/lib/python2.7/subprocess,py", line 679, in __init__
errread, errwrite)
File "usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory