Created
June 18, 2014 12:19
-
-
Save chopmann/34402d1851bc9d8830f2 to your computer and use it in GitHub Desktop.
Keygen for a University Exercise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'sirmonkey' | |
import httplib | |
import re | |
addr = "m.andapp.de" | |
doc = "/br/ha4.php?mat=" | |
conn = httplib.HTTPConnection(addr) | |
pattern = 'Antwort:(.+?)<' | |
for i in range(70349800, 70349819): | |
conn.request("GET", doc + str(i)) | |
response = conn.getresponse() | |
result = re.search(pattern, response.read()).group(1) | |
test = (i - 7) % 73 | |
print "mat = {} : Antwort = {} -> Test {}".format(i, result, test) | |
conn.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment