Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is ncat not found on Git Bash?

Tags:

http

nmap

user_1 (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 -

Set up a simple server. I want to connect to it with ncat to learn HTTP.

I install ncat (pip install nmap):

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

Then, when I try and connect, cmd not found. It was working earlier. Not sure how I broke it.

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

I am using git bash on windows, and I have set up python36 on c drive and changed env variables and path accordingly.

like image 751
mrj Avatar asked Oct 01 '17 00:10

mrj


People also ask

How do I download NCAT Linux?

Ncat is integrated with Nmap and is available in the standard Nmap download packages (including source code and Linux, Windows, and Mac binaries) available from the Nmap download page. You can also find it in our SVN source code repository.

What is PWD command in Git bash?

The Bash command pwd is used to print the 'present working directory'. pwd is equivalent to executing cd on a DOS(Windows console host) terminal. This is the folder or path that the current Bash session resides in. The Bash command ls is used to 'list' contents of the current working directory.


1 Answers

I have been in this problem today and I solved it. the Nmap command must be in the $PATH environment variable for the discovery service account. To do this on windows do the following steps

  1. Click Start > Control Panel > System
  2. Click the Advanced tab, and select Environment Variables.
  3. Edit the Path system variable and add the directory where Nmap is installed.
  4. Restart the computer.

If you do this task, Nmap should be available to services on the computer and the command will be found in the terminal

like image 123
Aya Muhammad Avatar answered Oct 22 '22 08:10

Aya Muhammad