From 6c9b79537f03115c5e2d4883fd407a6ac870bffd Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Tue, 11 Jan 2022 10:18:56 -0600 Subject: Resume and rearrange Signed-off-by: Matt Strapp --- OLD/csci5271/ho2/crack6.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 OLD/csci5271/ho2/crack6.py (limited to 'OLD/csci5271/ho2/crack6.py') diff --git a/OLD/csci5271/ho2/crack6.py b/OLD/csci5271/ho2/crack6.py new file mode 100644 index 0000000..e17aca2 --- /dev/null +++ b/OLD/csci5271/ho2/crack6.py @@ -0,0 +1,21 @@ +import requests +from requests.packages.urllib3.exceptions import InsecureRequestWarning +import string + +requests.packages.urllib3.disable_warnings(InsecureRequestWarning) + +actual = "" +for n in range(19, -1, -1): + C = "Z" * n + res2 = requests.get("https://192.168.14.1/mac-cookie?username="+C, + verify=False).text.replace(".", "").split(" ")[-1].split('\n')[0] + for c in string.printable: + test = C + c + actual + res1 = requests.get("https://192.168.14.1/mac-cookie?username="+test, + verify=False).text.replace(".", "").split(" ")[-1].split('\n')[0] + print(test, res1, C, res2) + if res1 == res2: + actual = c + actual + break + +print("Key is", actual) -- cgit v1.2.3