Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am freedomknight on github.
  • I am freedomknight ( on keybase.
  • I have a public key ASCagSlMnhgATSYSNVBeeX7pwqt8UIP9husPP4oFKLvyXgo

To claim this, I am signing this object:

FreedomKnight /
Created Jan 10, 2014
Hello World Web Server
#!/usr/bin/env python
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(('localhost', 80))
while True:
connection, address = sock.accept()
buf = connection.recv(1024)
httpString = b"""\
HTTP/1.1 200 OK\r
FreedomKnight /
Last active May 31, 2020
中原 wifi 的登入器
#!/usr/bin/env python3
import urllib.request
import urllib.parse
import http.client
import time
import os
import re
import sys
import signal
import lxml.html