2017-10-01 72 views
0
jeanp (master *) 1_EchoServer $ python -m http.server 8000 

Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... 
127.0.0.1 - - [30/Sep/2017 18:57:11] "GET/HTTP/1.1" 200 - 

设置一个简单的服务器。我想用ncat连接到它来学习HTTP。为什么在Git Bash上找不到ncat?

我安装NCAT(PIP安装NMAP):

jeanp Documents $ pip install nmap 
    Requirement already satisfied: nmap in c:\python36\lib\site-packages 

然后,当我尝试连接,CMD没有找到。它在早些时候工作。不知道我是如何破坏它的。

jeanp Documents $ pip install nmap 
Requirement already satisfied: nmap in c:\python36\lib\site-packages 
jeanp Documents $ ncat -l 9999 
bash: ncat: command not found 

我在Windows上使用Git的bash中,我已经相应地设置了C盘上python36和改变ENV变量和路径。

回答

0

pip install nmap一起安装的Python“nmap”包只是一个输出解析库。它不包含Nmap二进制文件。用于Linux的Windows子系统(也称作Windows上的Bash,Windows上的a.k.a.Ubuntu)中的“nmap”包当前不能正常工作并且不受支持。

在Windows上获得Nmap(和Ncat)即用格式(二进制可执行文件)的唯一地方是directly from nmap.org