Skip to content

Instantly share code, notes, and snippets.

@PinoCookie
Last active May 3, 2019 10:53
Show Gist options
  • Save PinoCookie/171d3bd0d2321c46a4d21ada8425cd2b to your computer and use it in GitHub Desktop.
Save PinoCookie/171d3bd0d2321c46a4d21ada8425cd2b to your computer and use it in GitHub Desktop.
Easy anonupload script for lazy people
#!/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