diff options
author | Mike C <miguelc@r2d2.geek.local> | 2015-04-27 02:31:58 +0100 |
---|---|---|
committer | Mike C <miguelc@r2d2.geek.local> | 2015-04-27 02:31:58 +0100 |
commit | b942f98f372abec974968d88119b5b573e4cb39c (patch) | |
tree | c7214e957ce5ecc030b5c6e451ad5ae930131779 /libmproxy/platform/pf.py | |
parent | 1c5277b21fd283a3b58d145c5090f59d657b594d (diff) | |
download | mitmproxy-b942f98f372abec974968d88119b5b573e4cb39c.tar.gz mitmproxy-b942f98f372abec974968d88119b5b573e4cb39c.tar.bz2 mitmproxy-b942f98f372abec974968d88119b5b573e4cb39c.zip |
+ Use sys.platform.startswith("freebsd") instead of matching just freebsd10.
+ This means support for any freebsd version (note that I only tested 11-CURRENT and 9)
Diffstat (limited to 'libmproxy/platform/pf.py')
-rw-r--r-- | libmproxy/platform/pf.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmproxy/platform/pf.py b/libmproxy/platform/pf.py index 8c2f4678..97a4c192 100644 --- a/libmproxy/platform/pf.py +++ b/libmproxy/platform/pf.py @@ -13,7 +13,7 @@ def lookup(address, port, s): if "ESTABLISHED:ESTABLISHED" in i and spec in i: s = i.split() if len(s) > 4: - if sys.platform == "freebsd10": + if sys.platform.startswith("freebsd"): # strip parentheses for FreeBSD pfctl s = s[3][1:-1].split(":") else: @@ -21,4 +21,4 @@ def lookup(address, port, s): if len(s) == 2: return s[0], int(s[1]) - raise RuntimeError("Could not resolve original destination.")
\ No newline at end of file + raise RuntimeError("Could not resolve original destination.") |