in reply to Re^2: Extract source and destination IP from Sniffer::HTTP???
in thread Extract source and destination IP from Sniffer::HTTP???
Hmmm... It looks like I was wrong about callbacks. There's accessor methods src_host and dest_host in Sniffer::Connection class, but they don't work, actually Sniffer::HTTP just ignores information about hosts in packets. Sniffer::Connection module handles only TCP packets and doesn't receives any information about IP addresses. This is design issue, it's possible to fix but would require some work. So the only way to get addresses is to use handle_(eth|ip|tcp)_packet methods instead of run and extract addresses directly from packets, but that's not very convenient.
Update: perhaps it would require just fix handle_ip_packet function in Sniffer::HTTP, I'll see it tomorrow.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Extract source and destination IP from Sniffer::HTTP???
by Corion (Patriarch) on Feb 15, 2009 at 08:53 UTC | |
by zwon (Abbot) on Feb 15, 2009 at 10:18 UTC | |
by perlpreben (Beadle) on Feb 15, 2009 at 12:50 UTC | |
by perlpreben (Beadle) on Feb 15, 2009 at 14:26 UTC |