我在使用 nc 命令时遇到问题,无法使用代理,因为没有 -x 选项,而该选项应该存在。
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').
我的netcat过时了吗?我该如何更新它?感谢帮助。
答案1
看起来你有“传统”网络猫( netcat-traditional
) 已安装。该-x
选项可用于OpenBSD 网络猫( netcat-openbsd
)。也可以看看:netcat-traditional 和 netcat-openbsd 之间有什么区别?关于询问 Ubuntu。
答案2
netcat 有多种实现,您可能需要 BSD 实现,因为它提供了这一-x
选项。在 Ubuntu 中,它可以在netcat-openbsd
软件包中找到。