windows 7 - Netcat error: Can't grab 0.0.0.0:80 with bind
2014-07
sashoalm
When I tried to listen on port 80 in Windows 7 with netcat, I get this error:
C:\Users\sashoalm>echo "hello, world" | netcat.exe -l -p 80
Can't grab 0.0.0.0:80 with bind
On the other hand, selecting any other port works.
Answers
sashoalm
It turned out this port was being used. I used netstat -a -b
to find out which program uses it (it requires elevated privileges).
It turned out Skype will use port 80 and 443 for incoming connections, after reading https://support.skype.com/en/faq/FA148/which-ports-need-to-be-open-to-use-skype-for-windows-desktop, I changed that and now it works fine, netcat can listen on this port.
Related Question
osx - Netcat on Mac OS X
kzh
Is anybody else not able to get nc -lp 8888
working on Mac OS X? Is there another way to get this to work?
Related Answers
kzh
It looks to me as if the -p
option does nothing on the OS X version of netcat. To get it to work, I must do nc -l localhost 8888
.