Netcat
Like cat
Commands are the same, but the commands are
Cat
The function is completely "Web-based". The degree of ease-of-use and life-saving can be said to be quite confusing.
Top 100 network security tools
Ranking fourth in the ranking!
In addition
Tcp client
In addition to tools
TCP Server
The following is an example of using a ticket:
Netcat
How
Tcp client
Tools
The following command indicates that you want to forward/etc
The whole package is displayed, and the information is sent
10.0.0.99
Host
Port 3456
And specify
30
Second, there is no upstream destination or
30
No response in seconds
Timeout
.
# Tar-zcf-/etc | Netcat-W 30 10.0.0.99 3456
Netcat
How
TCP Server
Tools
If you use the above example, you may want to say that you still need to create a server on your own.
Accept these packets! The answer is :"
Netcat
You can use
Server
The command is used, and a program does not need to be written. "The following command is a false setting.
10.0.0.99
The host machine that hosts the row.
# Netcat-l-P 3456>/backup/my_etc_backup.tar.gz
-L numbers indicate inbound
Listen Mode
-P stands
Listen
Of
Port
For
3456
> My_etc_backup.tar.gz
Indicates that you want
TCP
All the imported resources are imported.
/Backup/my_etc_backup.tar.gz
Pending.
With the two simple examples above, we can know that the original online storage resources can be so simple. If you know
Rsync
Tool users may laugh and say, "Use Netcat
It's too troublesome. Use
Rsync
It is easier to use synchronous or standby cases 」. Yes. If you want to "Synchronize hosts ",
Rsync
Better than others, but Netcat
You can also do more!
Because Netcat
Any
TCP protocol
As we often use
Telnet
Zookeeper
HTTP
,
POP3
, Or
SMTP
Set the time, just use
Netcat
This allows us to perform more dynamic operations. The following is an example:
1. zookeeper
HTTP
Normal operation?
First, you must first create an HTTP
Command Invocation
Get_tw.yahoo.com.txt
, Content is as follows:
Get, HTTP, 1.0
HOST: tw.yahoo.com
Note: There must be two line numbers at the end of the command, so you can add two lines of blank lines after the text.
Then you can use the following command to obtain Yahoo!
Chimo's first hacker
Html
:
# Cat get_tw.yahoo.com.txt | NC tw.yahoo.com 80
After reading some commands or programs, you can complete and automatically modify the program that the website is still alive.
2. zookeeper
SMTP
Normal operation?
Zookeeper SMTP
The method also follows
HTTP
In the same way, the command is prefixed first, and the false parameter name is
Smtp_test.txt
, Content is as follows:
Helo localhost
Mail from: <will@test.com>
Rcpt to: <will@test.com>
Data
To: Will <will@test.com>
Subject: this is a test
This is first line
.
Quit
Then you can use the following command to set the SMTP command
To
Smtp.test.com
Now:
# Cat smtp_test.txt | NC smtp.test.com 25
The results of the rows are as follows:
# Cat smtp_test.txt | NC smtp.test.com 25
220 smtp.test.com ESMTP service ready Fri, 11 Jul 2008 19:13:17 + 0800 (CST)
250 smtp.test.com
250 sender <doggy@test.com> OK
250 recipient <doggy@test.com> OK
354 enter mail, end <CRLF>. <CRLF>
250 message accepted for delivery
221 smtp.test.com
In addition to the preceding example, you can also use ftp, POP3 ,...
And other
TCP-based
Can be used.
Netcat depends on each
Linux distribution
It is a very popular tool for disaster recovery. If you want
Windows
Use on
Netcat
Tool, you can
Here
.