mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
77eca33f26
Also, create one of the dodgiest web testing trusses in history. Tornado just seems to have no nice way of doing this.
23 lines
676 B
Python
Executable File
23 lines
676 B
Python
Executable File
#!/usr/bin/env python
|
|
import argparse
|
|
from libpathod import app
|
|
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()
|
|
|
|
application = app.PathodApp(
|
|
staticdir=args.staticdir
|
|
)
|
|
print "pathod listening on port %s"%args.port
|
|
try:
|
|
app.run(application, args.port, None)
|
|
except KeyboardInterrupt:
|
|
pass
|