From 1b9a3a90746bb2fba931505620880691ab0008fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sun, 2 Aug 2020 21:51:26 +0100 Subject: Expect an input file as argument instead. --- reversing_tools/abbott/extract_freestyle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'reversing_tools') diff --git a/reversing_tools/abbott/extract_freestyle.py b/reversing_tools/abbott/extract_freestyle.py index 3efbc5a..006b393 100755 --- a/reversing_tools/abbott/extract_freestyle.py +++ b/reversing_tools/abbott/extract_freestyle.py @@ -92,7 +92,7 @@ def main(): parser.add_argument( "pcap_file", action="store", - type=str, + type=argparse.FileType(mode="rb"), help="Path to the pcapng file with the USB capture.", ) @@ -100,7 +100,7 @@ def main(): logging.basicConfig(level=args.vlog) - session = usbmon.pcapng.parse_file(args.pcap_file, retag_urbs=False) + session = usbmon.pcapng.parse_stream(args.pcap_file, retag_urbs=False) if not args.device_address: for descriptor in session.device_descriptors.values(): -- cgit v1.2.3