mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
22 lines
645 B
Python
Executable File
22 lines
645 B
Python
Executable File
#!/usr/bin/env python
|
|
import argparse
|
|
import libpathod
|
|
import tornado.ioloop
|
|
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser(description='Process some integers.')
|
|
parser.add_argument("-p", dest='port', default=8888, type=int, help='Port.')
|
|
parser.add_argument(
|
|
"-s", dest='staticdir', default=None, type=str,
|
|
help='Directory for static files.'
|
|
)
|
|
args = parser.parse_args()
|
|
|
|
libpathod.application(staticdir=args.staticdir).listen(args.port)
|
|
print "pathod listening on port %s"%args.port
|
|
try:
|
|
tornado.ioloop.IOLoop.instance().start()
|
|
except KeyboardInterrupt:
|
|
pass
|
|
|