diff --git a/bin/x509/pcap-sslcert.py b/bin/x509/pcap-sslcert.py index 7cb06bd..3dd72dd 100644 --- a/bin/x509/pcap-sslcert.py +++ b/bin/x509/pcap-sslcert.py @@ -34,10 +34,11 @@ for l in fileinput.input(args.r): cert = None if flow.search(l): m = flow.match(l) - session = m.group(1) - srcip = m.group(2) - dstip = m.group(3) - dstport = m.group(4) + if m is not None: + session = m.group(1) + srcip = m.group(2) + dstip = m.group(3) + dstport = m.group(4) if (cert is True): certstring += l.rstrip('\n')