emanuele-f / PCAPReceiver

A sample app to show how to receive packets via PCAPdroid
13 stars 4 forks source link

Could it possible to parse http info (like domain and path) from Ipv4Packet in example code? #2

Open huangfengjing opened 5 months ago

emanuele-f commented 5 months ago

It's possible, but it's outside the scope of this sample project

huangfengjing commented 5 months ago

It's possible, but it's outside the scope of this sample project

Thank you for your prompt reply. Is there any tutorial or DEMO for Java language? I am not very familiar with C/C++. Do I need to modify PCAPdroid to send Packet containing HTTP information(maybe HTTPReassembly?). As far as I know, there is no HTTP information in the Ipv4Packet protocol. Or how to extract HTTP info from a DatagramPacket ?

emanuele-f commented 5 months ago

Do you see HTTP information in PCAPdroid itself (Connections tab, tap on a connection)? Today most traffic is encrypted, so you should probably start with HTTP only traffic (e.g. httpforever.com) then move to TLS decryption. The pcapplusplus C++ library offers useful utilities to extract L7 data from packets. Alternatively, you could write a mitmproxy addon, which is probably easier and it will allow you to work with encrypted data as well

huangfengjing commented 5 months ago

Do you see HTTP information in PCAPdroid itself (Connections tab, tap on a connection)? Today most traffic is encrypted, so you should probably start with HTTP only traffic (e.g. httpforever.com) then move to TLS decryption. The pcapplusplus C++ library offers useful utilities to extract L7 data from packets. Alternatively, you could write a mitmproxy addon, which is probably easier and it will allow you to work with encrypted data as well

OK, thanks a lot. I'll have a try.