diff --git a/libmproxy/__init__.py b/libmproxy/__init__.py index 2bbcaaf53..e69de29bb 100644 --- a/libmproxy/__init__.py +++ b/libmproxy/__init__.py @@ -1 +0,0 @@ -VERSION = "0.3" diff --git a/libmproxy/flow.py b/libmproxy/flow.py index 957d53012..dff58fa05 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -4,7 +4,7 @@ """ import subprocess, base64, sys, json, hashlib, Cookie, cookielib, copy import proxy, threading, netstring, filt -import controller +import controller, version class RunException(Exception): def __init__(self, msg, returncode, errout): @@ -230,6 +230,7 @@ class Flow: request = self.request.get_state() if self.request else None, response = self.response.get_state() if self.response else None, error = self.error.get_state() if self.error else None, + version = version.IVERSION ) if nobackup: d["backup"] = None diff --git a/libmproxy/version.py b/libmproxy/version.py new file mode 100644 index 000000000..35c6e8de8 --- /dev/null +++ b/libmproxy/version.py @@ -0,0 +1,2 @@ +IVERSION = (0, 3) +VERSION = ".".join([str(i) for i in IVERSION]) diff --git a/mitmdump b/mitmdump index 93f770609..814f2af37 100755 --- a/mitmdump +++ b/mitmdump @@ -17,9 +17,7 @@ import sys, os.path from libmproxy import proxy, dump, utils -from libmproxy import VERSION - - +from libmproxy.version import VERSION from optparse import OptionParser, OptionGroup diff --git a/mitmproxy b/mitmproxy index fed5dbac9..acc7a2bae 100755 --- a/mitmproxy +++ b/mitmproxy @@ -17,7 +17,7 @@ import sys, os.path from libmproxy import proxy, controller, console, utils -from libmproxy import VERSION +from libmproxy.version import VERSION from optparse import OptionParser, OptionGroup