没有nmap属性“ PortScanner”?

时间:2019-08-29 22:45:37

标签: python nmap

使用Python 3(以PyCharm作为我的IDE)和运行OS Mojave(版本10.14.6)的Mac。我尝试使用终端命令python-nmap安装python-nmap install。很好但是,当尝试使用nmap.PortScanner时,我不断收到此错误:

  

“ AttributeError:模块'nmap'没有属性'PortScanner'”。

该怎么办?

import nmap

ns = nmap.PortScanner()

print(ns.nmap_version())

ns.scan('**IP Address goes here, not actually uploading an IP but I know it goes here, this isn't the problem**', '1-1024', '-v')
print(ns.scaninfo())

print(ns.csv())

0 个答案:

没有答案