ÈçºÎÔڽű¾ÖУ¬ÊäÈë½»»¥»á»°ÊÇËùÐèµÄÐÅÏ¢
ÈçÓÃFTPµÇ½ÆäËû·þÎñÆ÷£º[oracle@login oracle]$ [color=magenta]ftp 172.16.1.11[/color]
Connected to 172.16.1.11 (172.16.1.11).
220 ready, dude (vsFTPd 1.1.0: beat me, break me)
Name (172.16.1.11:oracle): [color=red]hrms
[/color]331 Please specify the password.
Password:[color=red]******[/color]
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
ÏÖÔÚÏëдһshell½Å±¾ÊµÏ֯书ÄÜ£¬µ«ÊÇÆäÖкìÉ«µØ·½µÄÕʺźÍÃÜÂëÐèÒª½»»¥Ê½ÊäÈ룬²»ÖªµÀÔõôʵÏÖÄØ£¿£¿£¿
ллÀ For ftp you can try like this:[code][color=blue]-(dearvoid@LinuxEden:tty3)-(~)-
[17783 0] $ [/color]ftp -i -n << END
> open ftp.gnu.org
> user anonymous password
> pwd
> ls
> END
257 "/"
lrwxrwxrwx 1 0 0 8 Aug 20 2004 CRYPTO.README -> .message
-rw-r--r-- 1 0 0 17864 Oct 23 2003 MISSING-FILES
-rw-r--r-- 2 0 0 4178 Aug 13 2003 MISSING-FILES.README
-rw-r--r-- 1 0 0 17992 Sep 18 2003 MISSING-FILES~
-rw-r--r-- 1 0 0 2103 Aug 16 2002 README
-rw-r--r-- 1 0 0 1516 Aug 18 2000 README.~1~
-rw-r--r-- 1 0 0 405121 Oct 23 2003 before-2003-08-01.md5sums.asc
drwxrwxr-x 264 0 1003 8192 Jun 21 21:50 gnu
drwxrwxr-x 3 0 1003 4096 Sep 23 2004 gnu+linux-distros
-rw-r--r-- 1 0 0 90 Feb 16 1993 lpf.README
-rw-r--r-- 1 0 0 312360 Aug 15 10:31 ls-lrRt.txt.gz
drwxr-xr-x 3 0 0 4096 Apr 20 2005 mirrors
lrwxrwxrwx 1 0 0 11 Apr 15 2004 non-gnu -> gnu/non-gnu
drwxr-xr-x 29 0 0 4096 Apr 03 21:47 old-gnu
lrwxrwxrwx 1 0 0 1 Aug 05 2003 pub -> .
drwxr-xr-x 7 0 0 4096 Jan 15 2004 savannah
drwxr-xr-x 2 0 0 4096 Aug 02 2003 third-party
-rw-r--r-- 1 0 0 954 Aug 13 2003 welcome.msg
-rw-r--r-- 1 0 0 849 Apr 10 2002 welcome.msg~
[color=blue]-(dearvoid@LinuxEden:tty3)-(~)-
[17783 0] $ [/color][/code] ³¬¼¶°æÖ÷£¬ÏȸÐлÄãµÄ°ïÖú
µ«ÊÇÓÐûÆäËû°ì·¨ÄØ£¿Õâ¸ö·½·¨²»´óºÃÓ㬶øÇÒÓÃÕâ¸ö·½·¨Ð´½Å±¾Ò²²»´óºÃÕûÄØ To crack common interactive applications you can turn to the well-known [url=http://expect.nist.gov/]expect[/url]. ½Å±¾Ã»Ð´ºÃ£¬²»¹ýÎÒÕÒµ½¸öÐµķ½·¨´úÌæ
scp src.txt username@hostname:/home/test/
Õâ¸ö¿ÉÒÔ½«src¸´ÖƵ½Ô¶³ÌÖ÷»ú£¨hostname£©µÄ/home/test/ÏÂ
Ò»°ãÇé¿öÏÂÒ²ÒªÇó½»»¥Ê½µØÊäÈëÃÜÂ룬µ«ÊÇÖ»Óд´½¨SSHÃÜԿͨµÀ£¬¾Í¿ÉÒÔ²»ÓÃÊäÈëÃÜÂëÁË¡£ Fine. If you just want to copy files from one host to another that's enough. :) µ«ÊÇÒªÊÇÎÒѧ»áÔڽű¾ÖÐʵÏÖÊäÈë½»»¥Ê½ËùÐèÐÅÏ¢£¬ÄÇÑùÇÒ²»ÊǸüºÃ£¿ Sure. I recommend you spend some time on learning [url=http://expect.nist.gov/]expect[/url]. It's absolutely useful. But at first, you better take a look at [url=http://www.tcl.tk/]Tcl[/url], which expect is based on. ÕâÑùÓ¦¸ÃÒ²¿ÉÒÔ£¬ ÓÃÒ»¸ö¹ÜµÀ´«ÊäÃüÁî
[ ! -f "./myinputfile" ] && mknod ./myinputfile p
exec 4<>./myinputfile
ftp IP <&4
echo "$user $password ">./myinputfile
echo "$other command" > ./myinputfile
...... Thank you very much
Ò³:
[1]