Merge branch 'master' of ssh.github.com:cortesi/mitmproxy

This commit is contained in:
Aldo Cortesi 2014-01-28 12:55:03 +13:00
commit 23ba4eccd8
2 changed files with 16 additions and 4 deletions

View File

@ -1,11 +1,17 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys, signal import sys, signal
from libmproxy import proxy, dump, cmdline, version from libmproxy import proxy, dump, cmdline
import libmproxy.version, netlib.version
import argparse import argparse
if __name__ == '__main__': if __name__ == '__main__':
# We don't introduce backward-incompatible changes in patch versions. Only consider major and minor version.
if netlib.version.IVERSION[:2] != libmproxy.version.IVERSION[:2]:
print >> sys.stderr, ("warning: You are using mitmdump %s with netlib %s. "
"Most likely, that doesn't work - please upgrade!") % (libmproxy.version.VERSION,
netlib.version.VERSION)
parser = argparse.ArgumentParser(usage = "%(prog)s [options] [filter]") parser = argparse.ArgumentParser(usage = "%(prog)s [options] [filter]")
parser.add_argument('--version', action='version', version="mitmdump" + " " + version.VERSION) parser.add_argument('--version', action='version', version="mitmdump" + " " + libmproxy.version.VERSION)
cmdline.common_options(parser) cmdline.common_options(parser)
parser.add_argument( parser.add_argument(
"--keepserving", "--keepserving",

View File

@ -1,12 +1,18 @@
#!/usr/bin/env python #!/usr/bin/env python
import sys, argparse, os import sys, argparse, os
from libmproxy import proxy, console, cmdline, version from libmproxy import proxy, console, cmdline
import libmproxy.version, netlib.version
from libmproxy.console import palettes from libmproxy.console import palettes
if __name__ == '__main__': if __name__ == '__main__':
# We don't introduce backward-incompatible changes in patch versions. Only consider major and minor version.
if netlib.version.IVERSION[:2] != libmproxy.version.IVERSION[:2]:
print >> sys.stderr, ("warning: You are using mitmproxy %s with netlib %s. "
"Most likely, that doesn't work - please upgrade!") % (libmproxy.version.VERSION,
netlib.version.VERSION)
parser = argparse.ArgumentParser(usage = "%(prog)s [options]") parser = argparse.ArgumentParser(usage = "%(prog)s [options]")
parser.add_argument('--version', action='version', version=version.NAMEVERSION) parser.add_argument('--version', action='version', version=libmproxy.version.NAMEVERSION)
cmdline.common_options(parser) cmdline.common_options(parser)
parser.add_argument("--debug", dest="debug", default=False, action="store_true") parser.add_argument("--debug", dest="debug", default=False, action="store_true")
parser.add_argument( parser.add_argument(