Last active
January 15, 2018 02:38
-
-
Save Aaron1011/2595f8699ade9d4df16398a68e8c1a52 to your computer and use it in GitHub Desktop.
Permanent Redirect Guesser
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
import requests | |
import sys | |
import time | |
import datetime | |
URL = "https://permanent-redirect.xyz/pages/{}" | |
def main(): | |
start = datetime.datetime.now() | |
for minute in range(start.minute, -1, -1): | |
for second in range(59, -1, -1): | |
new_time = start.replace(minute=minute, second=second) | |
unix = int(time.mktime(new_time.timetuple())) | |
url = URL.format(unix) | |
print("Trying: ", url, new_time) | |
resp = requests.get(url) | |
if resp.status_code == 200: | |
print("Found!") | |
print(resp.text) | |
return | |
continue | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment