Created
October 29, 2019 20:18
-
-
Save MayankFawkes/7eb620462c20f1615468f9029166267c to your computer and use it in GitHub Desktop.
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 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