diff options
author | Papoteur <papoteur@mageia.org> | 2022-05-04 08:37:23 +0200 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2022-05-04 09:03:04 +0200 |
commit | 7ef322dfe5b12891e8a39e42a34eb4c34ffdf52b (patch) | |
tree | 3556370c7b3188b96cd35737bd278fe321200f75 /src | |
parent | 1d11b5c361af8dd8cb4ba4797469b16cd531c1e2 (diff) | |
download | msec-7ef322dfe5b12891e8a39e42a34eb4c34ffdf52b.tar msec-7ef322dfe5b12891e8a39e42a34eb4c34ffdf52b.tar.gz msec-7ef322dfe5b12891e8a39e42a34eb4c34ffdf52b.tar.bz2 msec-7ef322dfe5b12891e8a39e42a34eb4c34ffdf52b.tar.xz msec-7ef322dfe5b12891e8a39e42a34eb4c34ffdf52b.zip |
Fix reading iptables output
Diffstat (limited to 'src')
-rwxr-xr-x | src/msec/tools.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/msec/tools.py b/src/msec/tools.py index f62c1bc..50b9208 100755 --- a/src/msec/tools.py +++ b/src/msec/tools.py @@ -27,8 +27,8 @@ def find_firewall_info(log): firewall_entries = [] try: p = subprocess.run(["iptables", "-S"], capture_output=True) - data = p.stdout - for l in data: + data = p.stdout.decode('utf-8') + for l in data.splitlines(): if l[:3] == "-A ": firewall_entries.append(l.strip()) except: |