From 0bf292ac2922c633a34cb3977da71003dc479dcf Mon Sep 17 00:00:00 2001 From: byt3bl33d3r Date: Thu, 27 Aug 2015 12:33:47 +0200 Subject: [PATCH] replaced rdpcap function with PcapReader for efficiency --- net-creds.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net-creds.py b/net-creds.py index a5b1d32..cb6dd98 100755 --- a/net-creds.py +++ b/net-creds.py @@ -968,11 +968,11 @@ def main(args): # Read packets from either pcap or interface if args.pcap: try: - pcap = rdpcap(args.pcap) - except Exception: + for pkt in PcapReader(args.pcap): + pkt_parser(pkt) + except IOError: exit('[-] Could not open %s' % args.pcap) - for pkt in pcap: - pkt_parser(pkt) + else: # Check for root if geteuid():