Merge pull request #38 from dimorphic/master

Fix net.sniff http URL format reporting (regression after path/hostname fix)
This commit is contained in:
Simone Margaritelli 2018-02-01 18:43:56 +01:00 committed by GitHub
commit fa2ada828b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,11 +35,11 @@ func httpParser(ip *layers.IPv4, pkt gopacket.Packet, tcp *layers.TCP) bool {
ua = string(mu[1])
}
url := fmt.Sprintf("%s", core.Yellow(path))
url := fmt.Sprintf("%s", core.Yellow(hostname))
if tcp.DstPort != 80 {
url += fmt.Sprintf(":%s", vPort(tcp.DstPort))
}
url += fmt.Sprintf("%s", hostname)
url += fmt.Sprintf("%s", path)
NewSnifferEvent(
pkt.Metadata().Timestamp,