7

I am having problem with nc command, I cannot use a proxy, because there is no -x option, which should be there.

 nc -h
[v1.10-41]
connect to somewhere:   nc [-options] hostname port[s] [ports] ...
listen for inbound:     nc -l -p port [-options] [hostname] [port]
options:
        -c shell commands       as `-e'; use /bin/sh to exec [dangerous!!]
        -e filename             program to exec after connect [dangerous!!]
        -b                      allow broadcasts
        -g gateway              source-routing hop point[s], up to 8
        -G num                  source-routing pointer: 4, 8, 12, ...
        -h                      this cruft
        -i secs                 delay interval for lines sent, ports scanned
        -k                      set keepalive option on socket
        -l                      listen mode, for inbound connects
        -n                      numeric-only IP addresses, no DNS
        -o file                 hex dump of traffic
        -p port                 local port number
        -r                      randomize local and remote ports
        -q secs                 quit after EOF on stdin and delay of secs
        -s addr                 local source address
        -T tos                  set Type Of Service
        -t                      answer TELNET negotiation
        -u                      UDP mode
        -v                      verbose [use twice to be more verbose]
        -w secs                 timeout for connects and final net reads
        -C                      Send CRLF as line-ending
        -z                      zero-I/O mode [used for scanning]
port numbers can be individual or ranges: lo-hi [inclusive];
hyphens in port names must be backslash escaped (e.g. 'ftp\-data').

Is my netcat outdated? How do I update it? Thanks for help.

1
  • 1
    If you are going to (re)install something, I suggest you also look at socat. It provides even more combinations of options. Commented Nov 16, 2020 at 17:55

2 Answers 2

9

Looks like you have the "traditional" netcat (netcat-traditional) installed. The -x option is available in the OpenBSD netcat (netcat-openbsd). See also: What are the differences between netcat-traditional and netcat-openbsd? on Ask Ubuntu.

5

There are multiple implementations of netcat, you probably want the BSD one, because it provides the -x option. In Ubuntu it is available in the netcat-openbsd package.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.