Skip to content

Instantly share code, notes, and snippets.

View melowody's full-sized avatar

Melody melowody

View GitHub Profile
@melowody
melowody / gd_post.py
Last active December 12, 2021 14:37
Function to post to the GD servers from python
import urllib.request, json
import urllib.parse
def send_request(url: str, **kw):
opener = urllib.request.build_opener()
opener.addheaders = [(header, value)
for header, value in opener.addheaders
if header.casefold() != 'user-agent']
with opener.open("http://www.boomlings.com/database/" + url, data=bytes(urllib.parse.urlencode(kw), 'utf-8')) as response:
import urllib.request, random
y = 0
while(True):
x = random.randint(0,40000000)
try:
fp = urllib.request.urlopen("http://gdidthingpython.000webhostapp.com/thing.php?id=" + str(x))
mybytes = fp.read()