Skip to content

Instantly share code, notes, and snippets.

@Syzygianinfern0
Created February 21, 2021 12:02
Show Gist options
  • Save Syzygianinfern0/6aad721c85aea8ec422ba7c0ea937920 to your computer and use it in GitHub Desktop.
Save Syzygianinfern0/6aad721c85aea8ec422ba7c0ea937920 to your computer and use it in GitHub Desktop.
Post to SXCU.NET
# Head over to https://sxcu.net/
# Create a subdomain
# Run script
# Replace returned sxcu.net base-url by the one you requested
# Profit
import os
import pprint
import requests
url = 'https://sxcu.net/upload'
path_img = '/home/sharan/Downloads/giphy.gif'
with open(path_img, 'rb') as img:
name_img = os.path.basename(path_img)
files = {'image': (name_img, img, 'multipart/form-data', {'Expires': '0'})}
with requests.Session() as s:
r = s.post(url, files=files)
pprint.pprint(r.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment