问题
I'm only in the pre-first stage of the project, so the question is very straight forward and basic. I like to listen to (using Java/C++) every WiFi packets in the range of my laptop, all I care for are the message headers and the very existence of the message so encryption doesn't really play a role here.
Is there a way to get that from Windows(8)/Ubuntu? I didn't manage to find any sort of API form Broadcom, so I guess accessing the card directly won't be trivial. If that's impossible then I could try and do the same with WindowsPhone 8, so if any one know a way for that, it would also be very helpful.
回答1:
You can try the links below..
jNetPcap http://jnetpcap.com/examples
WinPcap https://www.winpcap.org/docs/docs_40_2/html/group__wpcapsamps.html
回答2:
Java isn't very good for this purpose, since this almost directly touches very basics of your machine. You should take a look at "Windows driver kit" and consider using lower level language like C++ for this. Although even then, you will run into obstacles like anti-virus software, trying to block your package sniffing.
来源:https://stackoverflow.com/questions/22437752/listening-to-wifi-packets