主頁(yè) > 知識(shí)庫(kù) > 使用netcat(瑞士軍刀)進(jìn)行文件傳輸

使用netcat(瑞士軍刀)進(jìn)行文件傳輸

熱門標(biāo)簽:外呼電話系統(tǒng)怎么操作 百度地圖標(biāo)注直線距離 鶴崗400電話申請(qǐng) 天津電話外呼系統(tǒng)排名 商機(jī)地圖標(biāo)注 智能電銷機(jī)器人有用嗎 怎么在百度地圖標(biāo)注公司的位置 測(cè)繪地圖標(biāo)注名稱 德陽(yáng)400電話申請(qǐng)

nc(netcat)被譽(yù)為網(wǎng)絡(luò)工具中的“瑞士軍刀”,體積雖小但功能強(qiáng)大,nc最簡(jiǎn)單的功能是端口掃描,這里我主要筆記一下它作為文件傳輸?shù)拿钣谩?br />

首先看一下幫助信息。

$ 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!
...

簡(jiǎn)單文件傳輸:

客戶端:

$ nc -l 192.168.1.11 1234 > passwd.txt 

服務(wù)端:

$ nc 192.168.1.11 1234  /etc/passwd

也可以是

cat /etc/passwd | nc 192.168.1.11 1234

服務(wù)端ip是192.169.1.11,端口是1234

如此,當(dāng)兩臺(tái)linux機(jī)器需要簡(jiǎn)單傳輸文件時(shí),再好不過了~

您可能感興趣的文章:
  • Linux命令行里的“瑞士軍刀”
  • Linux利用nc命令監(jiān)控服務(wù)器端口的方法

標(biāo)簽:六盤水 鎮(zhèn)江 滁州 武漢 百色 自貢 優(yōu)質(zhì)小號(hào) 丹東

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《使用netcat(瑞士軍刀)進(jìn)行文件傳輸》,本文關(guān)鍵詞  使用,netcat,瑞士軍刀,進(jìn)行,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《使用netcat(瑞士軍刀)進(jìn)行文件傳輸》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于使用netcat(瑞士軍刀)進(jìn)行文件傳輸?shù)南嚓P(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章