Ask Your Question
0

tshark and wlan on Windows

asked 2019-02-25 20:23:54 +0000

tomycat gravatar image

updated 2019-02-25 22:00:22 +0000

Guy Harris gravatar image

Wireshark and wireless goes without problems. My problem is tshark and wlan:

C:\Program Files (x86)\Wireshark>tshark -i wlan -w capture.pcap tcp port 12345
Capturing on 'wlan'
tshark: The capture session could not be initiated on interface 'wlan' (Error op
ening adapter: Das System kann das angegebene Gerät nicht finden. (20)).
Please check to make sure you have sufficient permissions, and that you have the
 proper interface or pipe specified.

C:\Program Files (x86)\Wireshark>tshark -i wlan0 -w capture.pcap tcp port 12345
Capturing on 'wlan0'
tshark: The capture session could not be initiated on interface 'wlan0' (Error o
pening adapter: Das System kann das angegebene Gerät nicht finden. (20)).
Please check to make sure you have sufficient permissions, and that you have the
 proper interface or pipe specified.

C:\Program Files (x86)\Wireshark>tshark -i wlan1 -w capture.pcap tcp port 12345
Capturing on 'wlan1'
tshark: The capture session could not be initiated on interface 'wlan1' (Error o
pening adapter: Das System kann das angegebene Gerät nicht finden. (20)).
Please check to make sure you have sufficient permissions, and that you have the
 proper interface or pipe specified.

C:\Program Files (x86)\Wireshark>
edit retag flag offensive close merge delete

Comments

So does your Windows system actually have interfaces named "wlan" or "wlan0" or "wlan1"? If not, obviously trying to capture on "wlan" or "wlan1" or "wlan2" isn't going to work, because, as the error message tells you, the system can't find that interface.

What does Wireshark call your Wi-Fi interfaces? That's what tshark -D will show you.

Guy Harris gravatar imageGuy Harris ( 2019-02-25 22:00:11 +0000 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-02-25 21:06:09 +0000

cmaynard gravatar image

What does tshark -D show for interfaces? On my computer, the wireless interface is enumerated as interface 5, something like so:

5. \Device\NPF_{...} (WiFiInterfaceName)

So I could use any of these formats:

tshark -i 5 -w capture.pcap tcp port 12345
tshark -i \Device\NPF_{...} -w capture.pcap tcp port 12345
tshark -i WiFiInterfaceName -w capture.pcap tcp port 12345
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-02-25 20:23:54 +0000

Seen: 720 times

Last updated: Feb 25 '19