diff options
author | Matt Strapp <matt@mattstrapp.net> | 2021-12-13 23:27:36 -0600 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2021-12-13 23:27:36 -0600 |
commit | e9188c214b40ef66f2fc04c42ad0b5166d4de40e (patch) | |
tree | 1f9fd3766956e72c4c4be92dbba86cbfe3b532c1 /csci5271/ho2/crack6.py | |
parent | finish ho2 (diff) | |
download | homework-e9188c214b40ef66f2fc04c42ad0b5166d4de40e.tar homework-e9188c214b40ef66f2fc04c42ad0b5166d4de40e.tar.gz homework-e9188c214b40ef66f2fc04c42ad0b5166d4de40e.tar.bz2 homework-e9188c214b40ef66f2fc04c42ad0b5166d4de40e.tar.lz homework-e9188c214b40ef66f2fc04c42ad0b5166d4de40e.tar.xz homework-e9188c214b40ef66f2fc04c42ad0b5166d4de40e.tar.zst homework-e9188c214b40ef66f2fc04c42ad0b5166d4de40e.zip |
finish ho2 for real for real
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '')
-rw-r--r-- | csci5271/ho2/crack6.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/csci5271/ho2/crack6.py b/csci5271/ho2/crack6.py index 55a9263..e17aca2 100644 --- a/csci5271/ho2/crack6.py +++ b/csci5271/ho2/crack6.py @@ -5,18 +5,17 @@ import string requests.packages.urllib3.disable_warnings(InsecureRequestWarning) actual = "" -key = "Z"*19 for n in range(19, -1, -1): - res2 = requests.get("https://192.168.14.1/mac-cookie?username="+key, + 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 = key[:n] + c + 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, res2) + print(test, res1, C, res2) if res1 == res2: actual = c + actual break - key = key[:-1] print("Key is", actual) |