# # Src.Docs/expect.txt # # # Sources # ------------------- # http://expect.nist.gov/ # ftp://ftp.cme.nist.gov/pub/expect/expect.tar.Z # # # ftp example # http://lists.netisland.net/archives/plug/plug-1999-09/msg00099.html # # telnet example # http://www.cse.iitb.ac.in/~harsh/tutorials/automatic.html # # #!/usr/bin/expect -f # set timeout -1 # spawn telnet voxel.cse.iitb.ac.in # expect "login:" # send "harsh\r" # expect "Password:" # send "secret\r" # send "pine -i\r" # interact # # SQL example # http://lists.isb.sdnpk.org/pipermail/comp-list/2003-September/002508.html # # # crypt example # http://tejasconsulting.com/sqamag/expect.html # # # http://www.securityfocus.com/archive/105/294709/2002-10-06/2002-10-12/0 # # #!/usr/local/bin/expect -f # # Andre - Coleta arquivos de cadastros em todas webs e copia para diretorio # de sincronizacao # proc scpcad {maquina} { # eval spawn /usr/bin/scp -c blowfish -pr $maquina:/var/www/*tgz /var/www/ # set timeout 3 # expect "yes/no" {send "yes\r"} # expect "*assword:" # set timeout -1 # send the_password\r # expect eof # } # # # End of file