Skip to content

Instantly share code, notes, and snippets.

@dustyfresh
Created July 28, 2018 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustyfresh/1c255ddfcb4f857b8ae11227a2d209f1 to your computer and use it in GitHub Desktop.
Save dustyfresh/1c255ddfcb4f857b8ae11227a2d209f1 to your computer and use it in GitHub Desktop.
guess valid short links from kek.gg for research & educational purposes
#!/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)
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