#!/usr/local/bin/expect -f # ultarget.tcl - Expect script to upload a file # from the target # # Assumes expect is installed on host, ftpd running on target set file [lindex $argv 0] set target [lindex $argv 1] set timeout 60 spawn bash send "ftp $target\r" expect "): " send "root\r" expect "Password:" send "uClinux\r" expect "ftp> " send "cd /var/tmp\r" expect "ftp> " send "get $file\r" expect "ftp> " send "quit\r"