From 19ee42fa3e9ce45149f87baa447d224f1fb05caf Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Sun, 1 Feb 2015 14:41:15 +0100 Subject: [PATCH] Partial match group skipped --- bin/x509/pcap-sslcert.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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')