Linux:网络工具 nc
虽然叫nc不过用起来非常方便。
选项
- Use IPv4 only
- Use IPv6 only
-U, --unixsock Use Unix domain sockets only
-C, --crlf Use CRLF for EOL sequence
-c, --sh-exec <command> Executes the given command via /bin/sh
-e, --exec <command> Executes the given command
--lua-exec <filename> Executes the given Lua script
-g hop1[,hop2,...] Loose source routing hop points ( max)
-G <n> Loose source routing hop pointer (, , , ...)
-m, --max-conns <n> Maximum <n> simultaneous connections
-h, --help Display this help screen
-d, --delay <time> Wait between read/writes
-o, --output <filename> Dump session data to a file
-x, --hex-dump <filename> Dump session data as hex to a file
-i, --idle-timeout <time> Idle read/write timeout
-p, --source-port port Specify source port to use
-s, --source addr Specify source address to use (doesn't affect -l)
-l, --listen Bind and listen for incoming connections
-k, --keep-open Accept multiple connections in listen mode
-n, --nodns Do not resolve hostnames via DNS
-t, --telnet Answer Telnet negotiations
-u, --udp Use UDP instead of default TCP
--sctp Use SCTP instead of default TCP
-v, --verbose Set verbosity level (can be used several times)
-w, --wait <time> Connect timeout
--append-output Append rather than clobber specified output files
--send-only Only send data, ignoring received; quit on EOF
--recv-only Only receive data, never send anything
--allow Allow only given hosts to connect to Ncat
--allowfile A file of hosts allowed to connect to Ncat
--deny Deny given hosts from connecting to Ncat
--denyfile A file of hosts denied from connecting to Ncat
--broker Enable Ncat's connection brokering mode
--chat Start a simple Ncat chat server
--proxy <addr[:port]> Specify address of host to proxy through
--proxy-type <type> Specify proxy type ("http" or "socks4")
--proxy-auth <auth> Authenticate with HTTP or SOCKS proxy server
--ssl Connect or listen with SSL
--ssl-cert Specify SSL certificate file (PEM) for listening
--ssl-key Specify SSL private key (PEM) for listening
--ssl-verify Verify trust and domain name of certificates
--ssl-trustfile PEM file containing trusted SSL certificates
--version Display Ncat's version information and exit
监听端口
有时需要测试主机上的某个端口是否可达,尤其是配置防火墙的时候。可以通过nc -l <port>来指定打开的端口如:
nc -l
打开本机的6666端口,可以从其他远程主机上进行尝试的访问,可以通过Telnet进行连接。
与NCAT配合
与ncat配合可以进行简单的网络聊天与文本传输
Linux:网络工具 nc的更多相关文章
- linux网络工具nc命令
nc是netcat的简写,有着网络界的瑞士军刀美誉.因为它短小精悍.功能实用,被设计为一个简单.可靠的网络工具. nc命令的作用 (1)实现任意TCP/UDP端口的侦听,nc可以作为server以TC ...
- 【转】Linux 网络工具详解之 ip tuntap 和 tunctl 创建 tap/tun 设备
原文:https://www.cnblogs.com/bakari/p/10449664.html -------------------------------------------------- ...
- Linux 网络工具netcat(nc)的应用
NETCAT netcat是Linux常用的网络工具之一,它能通过TCP和UDP在网络中读写数据,通过与其他工具结合和重定向,可以在脚本中以多种方式使用它. netcat所做的就是在两台电脑之间建立链 ...
- 功能超级强大的网络工具nc
摘自:http://www.linuxso.com/command/nc.html 功能说明:功能强大的网络工具语 法:nc [-hlnruz][-g<网关...>][-G<指向器数 ...
- Linux 网络工具
1 nethogs nethogs 是一个免费的工具,当要查找哪个 PID (注:即 process identifier,进程 ID) 给你的网络流量带来了麻烦时,它是非常方便的.它按每个进程来分组 ...
- Linux 网络工具详解之 ip tuntap 和 tunctl 创建 tap/tun 设备
本文首发于我的公众号 Linux云计算网络(id: cloud_dev),专注于干货分享,号内有 10T 书籍和视频资源,后台回复「1024」即可领取,欢迎大家关注,二维码文末可以扫. 在前面一篇文章 ...
- linux网络工具iproute2的使用简介
一.写本文的目的 本文完全是自己在学习iproute2的过程中搜集的大杂烩,记录在这里,方便以后自己查询学习,图片都是来自网络,在此表示感谢! 二.简单了解iproute2工具套装 iproute2是 ...
- Linux 网络工具中的瑞士军刀 - socat & netcat
独立博客阅读:https://ryan4yin.space/posts/socat-netcat/ 文中的命令均在 macOS Big Sur 和 Opensuse Tumbleweed 上测试通过 ...
- 常用linux网络工具
iftop netstat nethogs可以查看进程占用网络的情况 nc -u -z -w2 192.168.0.1 1-1000 //扫描192.168.0.3 的端口 范围是 1-1000
随机推荐
- Java并发工具类之CountDownLatch
CountDownLatch允许一个或则多个线程等待其他线程完成操作. 假如我们有这样的需求:我们需要解析一个excel文件中的多个sheet,我们可以考虑使用多线程,每一个线程解析excel中的一个 ...
- jQuery Validation Plugin
使用方式很简单,简单测试代码如下: <html> <head> <script type="text/javascript" src="./ ...
- iOS完全自学手册——[二]Hello World工程
1.前言 写第二篇文章之前,我在想第二篇应该怎么写?后来觉得与其写Objective-C语言的相关语法,不如直接开始写个小项目.语法简单入门即可.因为,即便把语法看的很深到最后还是不一定能做项目,运用 ...
- Ajax与XMLHttpRequest随笔
1.XMLHttpRequest对象 创建XHR对象:let xhr = new XMLHttpRequest(); open():启动一个请求准备发送 open()接收3个参数:请求类型('GET' ...
- centos 7 keepalived故障邮件通知实战(附Python邮件发送脚本)
centos 7 keepalived故障邮件通知实战(附Python邮件发送脚本) ##################### sendmail.py begin ######## ...
- Linux awk命令详解[备份]
简介 awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大.简单来说awk就是把文件逐行的读入,以空格为默认分隔符将每行切片,切开的部分再 ...
- 用COS实现文件上传
cos是O'Rrilly公司开发的一款用于HTTP上传文件的OpenSource组件 需要cos.jar,下载地址:http://www.servlets.com/cos/ cos上传文件很简单,比f ...
- ActiveMQ-在Centos7下安装和安全配置
环境准备: JDK1.8 ActiveMQ-5.11 Centos7 1.下载Linux版本的ActiveMQ: $ wget http://apache.fayea.com/activemq/5.1 ...
- lower类的accessCode解读
/** Access codes for dereferencing(解引用), assignment, * and pre/post increment/decrement. * Access co ...
- libevent安装总结
1.先用:ls -al /usr/lib | grep libevent 查看是否已安装:如果已安装且版本低于1.3,则先通过:rpm -e libevent —nodeps进行卸载. 2.下载lib ...