当前位置:网站首页>nc基础用法1
nc基础用法1
2022-04-23 19:47:00 【franket】
端口扫描
[[email protected] ~]# nc -zvn 192.168.100.101 20-25
nc: connect to 192.168.100.101 port 20 (tcp) failed: No route to host
nc: connect to 192.168.100.101 port 21 (tcp) failed: No route to host
Connection to 192.168.100.101 22 port [tcp/*] succeeded!
nc: connect to 192.168.100.101 port 23 (tcp) failed: No route to host
nc: connect to 192.168.100.101 port 24 (tcp) failed: No route to host
nc: connect to 192.168.100.101 port 25 (tcp) failed: No route to host
[[email protected] ~]# nc -zvn 192.168.100.101 3306
Connection to 192.168.100.101 3306 port [tcp/*] succeeded!
[[email protected] ~]#
Option |
Comment |
---|---|
-z |
只作扫描,不发数据 |
-n |
不作解析,数字状态 |
-v |
给出详细信息 |
打开一个会话连接
[[email protected] ~]# nc -l 12345
hello
for test
i miss you
^_^
----------
[[email protected] BGPtest]# nc h102 12345
hello
for test
i miss you
^_^
此刻,要确认server端的防火墙对于12345端口是打开的
文件传输
server端发文件
[[email protected] nc]# echo "abc test" > file.txt
[[email protected] nc]# nc -l 2345 < file.txt
----------
[[email protected] nc]# nc h102 2345 > f.txt
[[email protected] nc]# cat f.txt
abc test
[[email protected] nc]#
server端收文件
[[email protected] nc]# nc -l 2345 > file.txt
----------
[[email protected] nc]# echo "uiuiuiuiui" > f.txt
[[email protected] nc]# nc -v h102 2345 < f.txt
Connection to h102 2345 port [tcp/dbm] succeeded!
[[email protected] nc]#
----------
[[email protected] nc]# cat file.txt
uiuiuiuiui
[[email protected] nc]#
版权声明
本文为[franket]所创,转载请带上原文链接,感谢
https://cloud.tencent.com/developer/article/1986159
边栏推荐
- Mysql database - basic operation of database and table (II)
- Hot reload debugging
- Data analysis learning directory
- @Mapperscan and @ mapper
- Lottery applet, mother no longer have to worry about who does the dishes (assign tasks), so easy
- MySQL数据库 - 连接查询
- Database query - course selection system
- Devops integration - environment variables and building tools of Jenkins service
- Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
- Scrum Patterns之理解各种团队模式
猜你喜欢
【数值预测案例】(3) LSTM 时间序列电量预测,附Tensorflow完整代码
Distinction between pointer array and array pointer
Class loading process of JVM
Project training of Software College of Shandong University - Innovation Training - network security shooting range experimental platform (VII)
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
Prefer composition to inheritance
MySQL syntax collation (3)
FFT物理意义: 1024点FFT就是1024个实数,实际进入fft的输入是1024个复数(虚部为0),输出也是1024个复数,有效的数据是前512个复数
Unity创建超写实三维场景的一般步骤
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
随机推荐
Executor、ExecutorService、Executors、ThreadPoolExecutor、Future、Runnable、Callable
Esp8266 - beginner level Chapter 1
How to select the third-party package of golang
Physical meaning of FFT: 1024 point FFT is 1024 real numbers. The actual input to FFT is 1024 complex numbers (imaginary part is 0), and the output is also 1024 complex numbers. The effective data is
A simple (redisson based) distributed synchronization tool class encapsulation
Introduction to electron tutorial 3 - process communication
DevOps集成-Jenkins 服务的环境变量和构建工具 Tools
图书管理数据库系统设计
Prefer composition to inheritance
LPC1768 关于延时Delay时间与不同等级的优化对比
Devops integration - environment variables and building tools of Jenkins service
仓库管理数据库系统设计
Unity general steps for creating a hyper realistic 3D scene
Design of library management database system
Kubernetes入门到精通-在 Kubernetes 上安装 OpenELB
Main differences between go and PHP
Introduction to electron Tutorial 4 - switching application topics
MySQL syntax collation
RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`
Project training of Software College of Shandong University - Innovation Training - network security shooting range experimental platform (VII)