PDA

View Full Version : Netcat hates me



Dunhausen
28th April 2006, 09:25 PM
All it does is echo the terse help output, no matter what.

Example:


[pimeson@narnia ~]$ nc -l -p 1111
usage: nc [-46DdhklnrStUuvz] [-i interval] [-p source_port]
[-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
[-x proxy_address[:port]] [hostname] [port[s]]
[pimeson@narnia ~]$ nc -l -p 5600 -vv
usage: nc [-46DdhklnrStUuvz] [-i interval] [-p source_port]
[-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
[-x proxy_address[:port]] [hostname] [port[s]]


I've tried it as root, too. And I've reinstalled it from yum. (this is on FC5)

Why would it not function at all? Am I missing something blatantly obvious?

sailor
28th April 2006, 10:11 PM
Shouldn't that be a l not a 1?

from the man page:



Basic usage is:
netcat -l -p port [remote_hostname] [remote_ports] ...

The remote hostname specifies which host is allowed to connect and
from which ports. Usually these parameters are not specified, but if
you want to sort out a special connection.

Dunhausen
28th April 2006, 10:19 PM
That is an 'L'; the font's just different when you use the code tags:

l vs. 1
The commands work just fine on my school's FC2 installation.

But after reading the man pages (I would have done that first except that it seemed to be a machine problem) it seems that using -l and -p together is no longer allowed, now it's just "nc -l 1111." (Isn't that going to break a lot of scripts?)

Thanks, though. :)

holtman
29th August 2006, 08:40 AM
You have the wrong netcat

Get: netcat-0.7.1-1.src.rpm from

http://sourceforge.net/project/showfiles.php?group_id=52204&release_id=209191

this allows the -l and -p

e.g nc -l -p 9000 | hexdump