Created
January 29, 2020 13:19
-
-
Save echel0nn/660083dfbc09b13ae9ed558a6065818c to your computer and use it in GitHub Desktop.
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
| #!/usr/bin/env python | |
| import requests | |
| import hashlib | |
| import sys | |
| def getMd5sum(TEXT): | |
| return hashlib.md5(TEXT.encode('utf-8')).hexdigest() | |
| def parseText(FULL_HTML): | |
| HINT_STR = "<h1 align='center'>MD5 encrypt this string</h1><h3 align='center'>" | |
| temp = "" | |
| text = FULL_HTML.split("\n") | |
| for satir in text: | |
| if HINT_STR in satir: | |
| temp = satir | |
| token = temp.replace(HINT_STR,"") | |
| token = token.split("</h3>") | |
| final = token[0] | |
| return final | |
| def sayfaGetir(URL): | |
| req = requests.get(URL) | |
| istenilen_string = parseText(req.text) | |
| return istenilen_string, req.cookies | |
| def postString(URL,STRING, COOKIES): | |
| ERR_STR = "Too slow!" | |
| DATA = {"hash": STRING} | |
| post_request = requests.post(URL, cookies=COOKIES, data=DATA) | |
| if ERR_STR not in post_request.text: | |
| print(post_request.text) | |
| sys.exit(0) | |
| if __name__ == "__main__": | |
| while True: | |
| URL = "XXX" | |
| gerekli_string, verilenCookie = sayfaGetir(URL) | |
| postString(URL, getMd5sum(gerekli_string), verilenCookie) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment