我在Ubuntu中使用python2。剛開始閱讀nmap的文檔。剛剛使用PortScanner後,我收到一個錯誤消息。不能使用python-nmap,OSError:[Errno] 2
>>> 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
你安裝了nmap嗎? '哪個nmap'說什麼? – mata
我已經安裝nmap。哪個nmap什麼都不返回。 –
'nmap' **應該**返回一些東西,如果你真的有它安裝。它在路上嗎?在你係統的任何文件夾中'nmap -V'是否適合你? –