Last active
August 29, 2015 14:06
-
-
Save tchn/7e4e92a40d535fb888d4 to your computer and use it in GitHub Desktop.
python ip-bound simpleHTTPServer
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
#!/usr/bin/env python | |
import sys | |
import BaseHTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
# addr = ("127.0.0.1", 8888) | |
addr = (sys.argv[1], int(sys.argv[2])) | |
srv = BaseHTTPServer.HTTPServer(addr, SimpleHTTPRequestHandler) | |
srv.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment