mitmproxy/pathod
2012-04-28 12:42:03 +12:00

22 lines
642 B
Python
Executable File

#!/usr/bin/env python
import argparse
import libomnid
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()
libomnid.application(staticdir=args.staticdir).listen(args.port)
print "omnid listening on port %s"%args.port
try:
tornado.ioloop.IOLoop.instance().start()
except KeyboardInterrupt:
pass