当前位置:网站首页>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
边栏推荐
- [transfer] summary of new features of js-es6 (one picture)
- [webrtc] add x264 encoder for CEF / Chromium
- uIP1. 0 actively sent problem understanding
- MySQL lock
- MySQL数据库 - 单表查询(一)
- 山大网安靶场实验平台项目-个人记录(五)
- MySQL数据库 - 单表查询(二)
- Garbage collector and memory allocation strategy
- MySQL数据库 - 数据库和表的基本操作(二)
- Distinction between pointer array and array pointer
猜你喜欢

指针数组与数组指针的区分

OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!

山东大学软件学院项目实训-创新实训-网络安全靶场实验平台(八)

MySQL syntax collation (4)

MySQL 进阶 锁 -- MySQL锁概述、MySQL锁的分类:全局锁(数据备份)、表级锁(表共享读锁、表独占写锁、元数据锁、意向锁)、行级锁(行锁、间隙锁、临键锁)

Build intelligent garbage classification applet based on Zero

First experience of using fluent canvas

Project training of Software College of Shandong University - Innovation Training - network security shooting range experimental platform (6)

【webrtc】Add x264 encoder for CEF/Chromium

MySQL syntax collation (5) -- functions, stored procedures and triggers
随机推荐
高效的串口循环Buffer接收处理思路及代码2
Machine learning catalog
Is meituan, a profit-making company with zero foundation, hungry? Coupon CPS applet (with source code)
What is a message queue
Why is the hexadecimal printf output of C language sometimes with 0xff and sometimes not
【h264】libvlc 老版本的 hevc h264 解析,帧率设定
Kibana reports an error server is not ready yet. Possible causes
如何在BNB链上创建BEP-20通证
Distinction between pointer array and array pointer
C6748 software simulation and hardware test - with detailed FFT hardware measurement time
Design of warehouse management database system
Introduction to electron tutorial 3 - process communication
Mfcc: Mel frequency cepstrum coefficient calculation of perceived frequency and actual frequency conversion
MySQL syntax collation (5) -- functions, stored procedures and triggers
@MapperScan与@Mapper
FFT物理意义: 1024点FFT就是1024个实数,实际进入fft的输入是1024个复数(虚部为0),输出也是1024个复数,有效的数据是前512个复数
[numerical prediction case] (3) LSTM time series electricity quantity prediction, with tensorflow complete code attached
Summary of several relationships of UML class diagram
Video understanding
php参考手册String(7.2千字)