/usr/share/exmh/ftp.expect is in exmh 1:2.8.0-5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #!/usr/bin/expect -f
set site [lindex $argv 0]
set dir [lindex $argv 1]
set theirname [lindex $argv 2]
set myname [lindex $argv 3]
set password "$env(USER)@"
set timeout 60
spawn ftp $site
expect "*Name*:*"
send "anonymous\r"
expect "*Password:*"
send "$password\r"
expect "*ftp>*"
send "binary\r"
expect "*ftp>*"
send "cd $dir\r"
expect "*550*ftp>*" {exit 1} "*250*ftp>*"
send "get $theirname $myname\r"
expect "*550*ftp>*" {exit 1} "*200*226*ftp>*"
close
wait
send_user "FTP transfer ok\n"
exit 0
|