Mili-NT

ixup

Sep 29th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. import sys
  3. import requests
  4. def content_upload(content):
  5. response = requests.post('http://ix.io', files={'f:1': ('file.ext', content)})
  6. return response.text
  7.  
  8. if __name__ == '__main__':
  9. try:
  10. with open(sys.argv[1], 'rb') as x:
  11. y = content_upload(x.read())
  12. print(y)
  13. except Exception as e:
  14. print(e)
Add Comment
Please, Sign In to add comment