Nehal Ahmed
Nehal Ahmed

Reputation: 11

tcpdump is not available when extracting packet features in windows

I have been trying to extract statistical features from a packet(pcap) using pyflowmeter but I keep on getting traceback error that :'scapy.error.Scapy_Exception: tcpdump is not available', I know this error will not occure in linux but I want to use this python package in windows.

from pyflowmeter.sniffer import create_sniffer

sniffer = create_sniffer(
            input_file='test.pcapng',
            to_csv=True,
            output_file='./flows_test.csv',
        )
sniffer.start()
try:
    sniffer.join()
except KeyboardInterrupt:
    print('Stopping the sniffer')
    sniffer.stop()
finally:
    sniffer.join()
None
Exception in thread AsyncSniffer:
Traceback (most recent call last):
  File "c:\Users\nikku\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "C:\Users\nikku\AppData\Roaming\Python\Python312\site-packages\ipykernel\ipkernel.py", line 766, in run_closure
    _threading_Thread_run(self)
  File "c:\Users\nikku\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "c:\Users\nikku\AppData\Local\Programs\Python\Python312\Lib\site-packages\scapy\sendrecv.py", line 1116, in _run
    sniff_sockets.update((PcapReader(
  File "c:\Users\nikku\AppData\Local\Programs\Python\Python312\Lib\site-packages\scapy\sendrecv.py", line 1118, in <genexpr>
    tcpdump(fname,
  File "c:\Users\nikku\AppData\Local\Programs\Python\Python312\Lib\site-packages\scapy\utils.py", line 2673, in tcpdump
    raise Scapy_Exception(
scapy.error.Scapy_Exception: tcpdump is not available

I want to extract 83 features from pcap file and store those features in a csv or in a variable.

Upvotes: 1

Views: 192

Answers (0)

Related Questions