Skip to content

Instantly share code, notes, and snippets.

@sethdusek
Created December 19, 2015 09:13
Show Gist options
  • Save sethdusek/337b52366ff6e5f79d71 to your computer and use it in GitHub Desktop.
Save sethdusek/337b52366ff6e5f79d71 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import subprocess32,requests,pyperclip
from os import system
image = subprocess32.Popen(["escrotum","-s","/tmp/img.png"],stdout=subprocess32.PIPE)
image = image.communicate()[0].rstrip()
key = "INSERTYOURKEYHERE"
upload = requests.post("WEBSITE:PORT",headers={"key":key},files={"file":("img.png",open(image,"rb"))})
print(upload.text)
system("notify-send \"Upload Done!\" %s" % upload.text)
pyperclip.copy(upload.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment