Author: Samarth Arora
Problem Page: bandit13
ankur used everything pls ask him
ssh -i
cat
ls - list files in a directory
cd
I read the man pages. In that -i(identity file) selects a file from which the identity (private key) for RSA or DSA authentication is read which seemed perfect for this level.
4wcYUJFw0k0XLShlDzztnTBHiqxU3b3e
#!/usr/bin/expect
spawn ssh -p 2220 [email protected]
expect "password:"
send -- "8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL\r"
expect "$ "
send -- "ssh -i sshkey.private bandit14@localhost \r"
expect "? "
send -- "yes\r"
send -- "cd ../../etc/bandit_pass/ \r"
send -- "cat bandit14 \r"
send -- "exit\r"
expect -- "$ "
send -- "exit\r"
interact
thx