Skip to content

Instantly share code, notes, and snippets.

@MayankFawkes
Created October 29, 2019 20:18
Show Gist options
  • Save MayankFawkes/7eb620462c20f1615468f9029166267c to your computer and use it in GitHub Desktop.
Save MayankFawkes/7eb620462c20f1615468f9029166267c to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import requests
def upload(filename):
URL = "http://api.anonfile.com/upload"
with open(filename) as f:
r = requests.post(url=URL, files={'file': f})
print(r.json())
def info(id):
URL="https://api.anonfile.com/v2/file/{id}/info".format(id=id)
r = requests.get(url=URL)
print(r.json())
if __name__ == '__main__':
upload("AnonFiles.py")
info("WeX8zb90n9")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment