當前位置:首頁 » 文件傳輸 » tftp下載上傳文件源碼
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

tftp下載上傳文件源碼

發布時間: 2022-12-20 12:17:28

Ⅰ linux tftp如何傳文件夾給開發板

通過tftp伺服器和開發板之間進行數據傳輸方法如下:

  1. 首先要建立好tftp伺服器;

  2. 在tftp配置文件/etc/xinetd.d/tftp,設置如下:

service tftp

{

socket_type= dgram

protocol= udp

wait= yes

user= root

server= /usr/sbin/in.tftpd

server_args= -s /tftpboot -c

disable= no

per_source= 11

cps= 100 2

flags= IPv4

}

3.將需要下載到開發板的文件放入對應的tftp下載目錄,在這里設置為/tftpboot目錄下

4.保證開發和tftpboot伺服器之間網路為通路狀態;

5.最後進行下載命令操作;

Ⅱ tftp到底怎麼使用

如何使用Tftp:

TFTP 自帶的幫助信息:

TFTP [-i] host [GET | PUT] source [destination]

-i Specifies binary image transfer mode (also called

octet). In binary image mode the file is moved

literally, byte by byte. Use this mode when transferring binary files.

host Specifies the local or remote host.

GET Transfers the file destination on the remote host to

the file source on the local host.

PUT Transfers the file source on the local host to

the file destination on the remote host.

source Specifies the file to transfer.

destination Specifies where to transfer the file.

說明:

-i選項是以二進制模式傳送文件,很多Exploit代碼就需要用這種模式來傳送。

Host是開啟了tftp服務的主機,可以是本地主機也可以是遠程主機。

get就是到當前運行的目錄裡面下載,而put就是把文件上傳到了開了tftp服務的機子。Source是你要上傳或者是下載的文件名稱。

下面舉幾個列子:

C:Longker>tftp -i 202.xx.xx.165 get sc.exe

tftp -i 202.xx.xx.165 get sc.exe

Transfer successful: 63248 bytes in 1 second, 63248 bytes/s

這個是從開了tftp服務的主機下載sc.exe程序,速度不錯吧 :)

C:Longker>tftp -i 202.xx.xx.165 put sc.exe

tftp -i 202.xx.xx.165 put sc.exe

Transfer successful: 63248 bytes in 1 second, 63248 bytes/s

上面是把sc.exe上傳到tftp伺服器。