Servers:
python3 -m http.server
python2 -m SimpleHTTPServer
python3 -m uploadserver 443 --server-certificate server.pem
from http.server import BaseHTTPRequestHandler, HTTPServer
import uuid
class Handler(BaseHTTPRequestHandler):
def do_POST(self):
length = int(self.headers.get("Content-Length", 0))
with open(str(uuid.uuid4()), "wb") as f:
f.write(self.rfile.read(length))
self.send_response(200)
self.end_headers()
self.wfile.write(b"OK")
HTTPServer(("0.0.0.0", 8080), Handler).serve_forever()
Downloads:
python2.7 -c 'import urllib;urllib.urlretrieve("https://LINK","OUT")'
python3 -c 'import urllib.request;urllib.request.urlretrieve("https://LINK","OUT")'