netcat(스위스 군도)를 사용 하여 파일 전송
우선 도움말 정 보 를 보 겠 습 니 다.
$ nc -h
OpenBSD netcat (Debian patchlevel 1.105-7ubuntu1)
This is nc from the netcat-openbsd package. An alternative nc is available
in the netcat-traditional package.
usage: nc [-46bCDdhjklnrStUuvZz] [-I length] [-i interval] [-O length]
[-P proxy_username] [-p source_port] [-q seconds] [-s source]
[-T toskeyword] [-V rtable] [-w timeout] [-X proxy_protocol]
[-x proxy_address[:port]] [destination] [port]
Command Summary:
-4 Use IPv4
-6 Use IPv6
-b Allow broadcast
-C Send CRLF as line-ending
-D Enable the debug socket option
-d Detach from stdin
-h This help text
-I length TCP receive buffer length
-i secs Delay interval for lines sent, ports scanned
-j Use jumbo frame
-k Keep inbound sockets open for multiple connects
-l Listen mode, for inbound connects
-n Suppress name/port resolutions
-O length TCP send buffer length
-P proxyuser Username for proxy authentication
-p port Specify local port for remote connects
-q secs quit after EOF on stdin and delay of secs
-r Randomize remote ports
-S Enable the TCP MD5 signature option
-s addr Local source address
-T toskeyword Set IP Type of Service
-t Answer TELNET negotiation
-U Use UNIX domain socket
-u UDP mode
-V rtable Specify alternate routing table
-v Verbose
-w secs Timeout for connects and final net reads
-X proto Proxy protocol: "4", "5" (SOCKS) or "connect"
-x addr[:port] Specify proxy address and port
-Z DCCP mode
-z Zero-I/O mode [used for scanning]
Port numbers can be individual or ranges: lo-hi [inclusive]
포트 스 캔:
$ nc -z -v -n 127.0.0.1 20-100
...
Connection to 127.0.0.1 80 port [tcp/*] succeeded!
...
단순 파일 전송:클 라 이언 트:
$ nc -l 192.168.1.11 1234 > passwd.txt &
서버:
$ nc 192.168.1.11 1234 < /etc/passwd
되다
cat /etc/passwd | nc 192.168.1.11 1234
서버 ip 은 192.169.11 이 고 포트 는 1234 입 니 다.이렇게 해서 두 대의 Liux 기계 가 파일 을 간단하게 전송 해 야 할 때 더 할 나 위 없 이 좋 습 니 다~
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
nc 명령으로 만드는 간단한 webhook 배포 서버nc는 netcat의 약자로 TCP, UDP의 원시 패킷을 읽고 쓰는 명령입니다. 예를 들어, netcat에서 HTTP 요청을 발행하려면 echo “GET / HTTP/1.0\n”와 HTTP 요청을 nc 명령으로 리...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.