Last active
May 3, 2019 10:53
-
-
Save PinoCookie/171d3bd0d2321c46a4d21ada8425cd2b to your computer and use it in GitHub Desktop.
Easy anonupload script for lazy people
This file contains 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 python3 | |
import requests | |
import json | |
import sys | |
file = {'file': open(sys.argv[0], 'rb')} | |
r = requests.post("https://anonfile.com/api/upload", files=file) | |
content = r.content.decode("utf-8") | |
json_file = json.loads(content) | |
if(json_file["status"] == True): | |
print(json_file["data"]["file"]["url"]["short"]) | |
else: | |
print("Something wrong with upload") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment