Ⅰ linux tftp如何傳文件夾給開發板
通過tftp伺服器和開發板之間進行數據傳輸方法如下:
首先要建立好tftp伺服器;
在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伺服器。