From ab9e86abd1f84c51bf7b02b63868b08dc4cf64ce Mon Sep 17 00:00:00 2001 From: evilsocket Date: Thu, 1 Feb 2018 15:29:31 +0100 Subject: [PATCH] fix: fixed net.sniff http reporting --- modules/net_sniff_http.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/net_sniff_http.go b/modules/net_sniff_http.go index fdf97d1a..477ad9d1 100644 --- a/modules/net_sniff_http.go +++ b/modules/net_sniff_http.go @@ -27,8 +27,8 @@ func httpParser(ip *layers.IPv4, pkt gopacket.Packet, tcp *layers.TCP) bool { } method := string(m[1]) - hostname := string(m[2]) - path := string(m[3]) + hostname := string(m[3]) + path := string(m[2]) ua := "" mu := uaRe.FindSubmatch(data) if len(mu) == 2 { @@ -47,10 +47,10 @@ func httpParser(ip *layers.IPv4, pkt gopacket.Packet, tcp *layers.TCP) bool { ip.SrcIP.String(), hostname, SniffData{ - "Method": method, - "Hostname": hostname, - "URL": url, - "UA": ua, + "method": method, + "host": hostname, + "path": url, + "agent": ua, }, "[%s] %s %s %s %s %s", vTime(pkt.Metadata().Timestamp),