Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am freedomknight on github.
  • I am freedomknight (https://keybase.io/freedomknight) on keybase.
  • I have a public key ASCagSlMnhgATSYSNVBeeX7pwqt8UIP9husPP4oFKLvyXgo

To claim this, I am signing this object:

@FreedomKnight
FreedomKnight / server.py
Created Jan 10, 2014
Hello World Web Server
View server.py
#!/usr/bin/env python
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(('localhost', 80))
sock.listen(5)
while True:
connection, address = sock.accept()
buf = connection.recv(1024)
httpString = b"""\
HTTP/1.1 200 OK\r
@FreedomKnight
FreedomKnight / autologin.py
Last active May 31, 2020
中原 wifi 的登入器
View autologin.py
#!/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