This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import select | |
from collections import deque | |
from socket import socket, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR | |
def create_listen_socket(bind_addr='0.0.0.0', bind_port=55555, backlogs=102400): | |
sock = socket(AF_INET, SOCK_STREAM) | |
sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) | |
sock.bind((bind_addr, bind_port)) | |
sock.listen(backlogs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import code | |
import threading | |
import sys | |
from io import StringIO | |
from xmlrpc.client import ServerProxy | |
from xmlrpc.server import SimpleXMLRPCServer | |
class OutputHookContext: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AntiGFW | |
DOMAIN-SUFFIX,amysecure.com | |
DOMAIN-SUFFIX,justmysocks.net | |
# Chrome | |
DOMAIN-SUFFIX,chrome. | |
# Docker | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DEFAULT_GOAL := run | |
callee.o: callee.c | |
gcc -fPIC -c callee.c | |
libcallee.so: callee.o | |
gcc -shared -o $@ $^ | |
caller: caller.go libcallee.so | |
go build caller.go |