Guest User

Untitled

a guest
Sep 15th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.27 KB | None | 0 0
  1.     spawn ssh $login@$ipaddr
  2.  
  3.     expect "*?assword:*" {
  4.         send "$password\r"
  5.     }
  6.  
  7.     send "sudo su -\r"
  8.  
  9.     expect {
  10.         "*?assword:*" {
  11.             send "$password\r"
  12.             expect "/home/root\] "
  13.         }
  14.     }
  15.  
  16.     send -- "whoami\r"
Add Comment
Please, Sign In to add comment