mbakholdina / lib-tcpdump-processing

Library designed to process .pcap(ng) tcpdump or Wireshark trace files and extract SRT packets of interest for further analysis
15 stars 3 forks source link

FileNotFoundError on Windows using both executable scripts #38

Closed ocalaf-unitenic closed 1 year ago

ocalaf-unitenic commented 2 years ago

I get this errors when I try to run the executables scripts or the py script files that they use:

extract-packets.exe .\caps\vmc12-rcv-SRT-1.pcapng Processing .pcapng to .csv tcpdump trace file: caps\vmc12-rcv-SRT-1.pcapng Traceback (most recent call last): File "C:\Users\username\Documents\Developer\SRT\.venv\Scripts\extract-packets-script.py", line 11, in <module> load_entry_point('lib-tcpdump-processing==0.1', 'console_scripts', 'extract-packets')() File "c:\users\username\documents\developer\srt\.venv\lib\site-packages\click\core.py", line 1128, in __call__ return self.main(*args, **kwargs) File "c:\users\username\documents\developer\srt\.venv\lib\site-packages\click\core.py", line 1053, in main rv = self.invoke(ctx) File "c:\users\username\documents\developer\srt\.venv\lib\site-packages\click\core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\users\username\documents\developer\srt\.venv\lib\site-packages\click\core.py", line 754, in invoke return __callback(*args, **kwargs) File "c:\users\username\documents\developer\srt\.venv\lib\site-packages\tcpdump_processing\extract_packets.py", line 404, in main csv_filepath = convert.convert_to_csv(pcapng_filepath, overwrite) File "c:\users\username\documents\developer\srt\.venv\lib\site-packages\tcpdump_processing\convert.py", line 98, in convert_to_csv process = subprocess.run(args, stdout=f) File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 489, in run with Popen(*popenargs, **kwargs) as process: File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, Is this expected on windows? I tried running the exe from powershell as well as from vscode

maxsharabayko commented 2 years ago

I would suggest experimenting with the path to your pcapng file .\caps\vmc12-rcv-SRT-1.pcapng.

ocalaf-unitenic commented 2 years ago

I tried moving the pcapng file to the same folder where the exe is as well as removing the "-" characters but I get the same errors

maxsharabayko commented 2 years ago

The path must be relative to the directory you are running the script from. Also, check if tshark is available on your system by running e.g. tshark --help.