mitmproxy/pathod

22 lines
645 B
Plaintext
Raw Normal View History

2012-04-28 00:42:03 +00:00
#!/usr/bin/env python
import argparse
2012-04-28 01:16:51 +00:00
import libpathod
2012-04-28 00:42:03 +00:00
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()
2012-04-28 01:16:51 +00:00
libpathod.application(staticdir=args.staticdir).listen(args.port)
print "pathod listening on port %s"%args.port
2012-04-28 00:42:03 +00:00
try:
tornado.ioloop.IOLoop.instance().start()
except KeyboardInterrupt:
pass