Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows 7 netcat error: 'nc' is not recognized as an internal or external command

Tags:

cmd

This is what's happening:

C:\Windows\system32>nc -v 10.1.2.205 22
'nc' is not recognized as an internal or external command, operable program or batch file.

Below is my screenshot:

enter image description here

Kindly help me on this issue.

like image 819
m.ghoroobi Avatar asked Dec 03 '22 15:12

m.ghoroobi


2 Answers

  • download NetCat from here https://eternallybored.org/misc/netcat/
  • unzip it and put is somewhere (eg: in C:)
  • use directly in the command prompt like: c:\netcat-1.11\nc google.com 80
  • optional: add to Environment Variables to be used from any context NetCat

Or install Nmap (includes Netcat)

  • for Windows https://nmap.org/dist/nmap-7.30-setup.exe
  • for Mac https://nmap.org/dist/nmap-7.30.dmg

To check whether ncat is installed and working, open up two terminals. In one of them, run ncat -l 9999 then in the other, ncat localhost 9999. Then type something into each terminal and press Enter. You should see the message on the opposite terminal. Look in this video https://www.youtube.com/watch?time_continue=1&v=qeQ6pKxUp-Q

like image 63
Dan Alboteanu Avatar answered Dec 05 '22 04:12

Dan Alboteanu


You should add the path to nc.exe to your PATH environment variable. Here's a walkthrough if you dunno how to acheive this: https://stackoverflow.com/a/28545224/5119765

like image 36
ADreNaLiNe-DJ Avatar answered Dec 05 '22 05:12

ADreNaLiNe-DJ