This commit is contained in:
virtual 2018-06-29 17:52:20 -04:00
parent d425eed7ee
commit f14e1b8c8b
1 changed files with 13 additions and 0 deletions

13
tinyurl.py Normal file
View File

@ -0,0 +1,13 @@
import requests
import sys
if sys.argv < 2:
print "[*] not enough stuff"
sys.exit(1)
def tiny(key, url):
req = requests.get("http://bhh.sh/api/v2/action/shorten?key=%s&url=%s&is_secret=true" % (key,url))
if req.status_code == 200:
print req.content
else:
print "oops!"
sys.exit()
tiny(sys.argv[1], sys.argv[2])