Windows下Python-nmap安装使用

1. 下载 Python-nmap :http://xael.org/pages/python-nmap-en.html

2. 解压并运行:python setup.py install

    会发现安装在了:C:\Python27\Lib\site-packages 路径下

3. 测试出现错误:

    >>>import nmap

    >>>nm = nmap.PortScanner()

错误: Traceback (most recent call last):
             File "", line 1, in
             NameError: name 'namp' is not defined

或者:XXXXXXX.....in init os.getenv('PATH') nmap.nmap.PortScannerError: 'nmap program was not found in path. PATH is : .....XXXXXXX

4. 解决办法:下载 NMAP 安装,并设置好环境变量

    下载地址:https://nmap.org/download.html#windows

    重启 python

你可能感兴趣的:(Windows下Python-nmap安装使用)