Skip to content

Instantly share code, notes, and snippets.

View SXHRYU's full-sized avatar
🤡
I'm just a little jokester. A silly little guy.

Slava M. SXHRYU

🤡
I'm just a little jokester. A silly little guy.
View GitHub Profile
@SXHRYU
SXHRYU / proxy_tcp_server.py
Created November 16, 2023 13:50
Example of proxy TCP echo server. Useful for debugging and analysing incoming traffic.
# Proxy echo TCP server program
import socket
HOST = "localhost"
PORT = 6667
HOST_NEW = "localhost"
PORT_NEW = 6666
CONNECTED = False
@SXHRYU
SXHRYU / reflect.py
Last active April 3, 2024 13:56 — forked from 1kastner/reflect.py
ruffed & blacked. A simple echo server to inspect http web requests
# ruff: noqa: N802, N815, E501
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import BaseHTTPRequestHandler, HTTPServer
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):