aboutsummaryrefslogtreecommitdiff
path: root/TCPStreamExtractor.py
diff options
context:
space:
mode:
Diffstat (limited to 'TCPStreamExtractor.py')
-rw-r--r--TCPStreamExtractor.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/TCPStreamExtractor.py b/TCPStreamExtractor.py
index d6dc10a..7acf693 100644
--- a/TCPStreamExtractor.py
+++ b/TCPStreamExtractor.py
@@ -56,10 +56,10 @@ def thread_maintanence(timer_val, stream_extractor, timeout=1000):
class TCPStreamExtractor:
def __init__(self, filename, packet_list=None, process_packets=True,
- outputdir=None, pcap_filters=None):
+ outputdir=None, bpf_filter=None):
self.filename = filename
- self.pcap_filter = pcap_filters
+ self.bpf_filter = bpf_filter
self.outputdir=outputdir
if not self.outputdir is None:
@@ -72,7 +72,7 @@ class TCPStreamExtractor:
self.packet_list = packet_list
if packet_list is None:
- self.packet_list =scapy.utils.rdpcap(filename)
+ self.packet_list = scapy.all.sniff(offline=filename, filter=self.bpf_filter, quiet=True)
self.pkt_num = 0
# a stream is mapped under two flow keys