2017-10-01 144 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