Created
July 28, 2018 23:53
-
-
Save dustyfresh/1c255ddfcb4f857b8ae11227a2d209f1 to your computer and use it in GitHub Desktop.
guess valid short links from kek.gg for research & educational purposes
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 random | |
import string | |
from time import sleep | |
while True: | |
sleep(random.choice(range(5))) | |
lol = ''.join(random.choice(string.ascii_uppercase + string.digits + string.ascii_lowercase) for _ in range(4)) | |
url = 'https://kek.gg/u/{}'.format(lol) | |
r = requests.get( | |
url, | |
headers={'User-Agent': ''} | |
) | |
if r.status_code is 200: | |
print('{} is a valid link!'.format(url)) | |
else: | |
print(r.status_code) |
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
https://kek.gg/u/sTmH is a valid link! | |
404 | |
404 | |
404 | |
https://kek.gg/u/62KP is a valid link! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment