Error: tshark file does not exist
LMech opened this issue · 2 comments
I tried to run the script put at first it did not find my NIC then i change the regex to my NIC name which is "wlp3s0" then the first step worked find, but it get stuck on i believe this line
p1 = subprocess.Popen(['tshark', '-r', file, '-e', 'wlan.ssid', '-e', 'wlan.bssid', '-Tfields'], stdout=subprocess.PIPE)
with the error tshark
The file "/home/lmech/Wifi-Sweep/wifi-sweep/session-649918958/dumpfile.pcapng" doesn't exist.
I do not see where to find the code of creating the file and when i tried using open(file)
the file was not has the pcapng format
Tried replacing -r with -w like so
p1 = subprocess.Popen(['sudo', 'tshark', '-w', file, '-e', 'wlan.ssid', '-e', 'wlan.bssid', '-Tfields'], stdout=subprocess.PIPE)
It did not work with error of permission denied
I use manjaro arch and the workspace on the home directory
i used
p1 = subprocess.Popen(['sudo', '-S', 'tshark', '-w', file, '-e', 'wlan.ssid', '-e', 'wlan.bssid', '-Tfields'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate(input=b'password\n')
and worked and listed all the NIC information but after about 5 minutes it did not capture anything.
Note: hcxdumptool was a separate package for me i do not know if the same goes for depian based distors
i think the problem in my interface or OS because i could not do the same even with airmon-ng i will try using kali maybe the problem in my OS.
I will close the issue for now