mirror of
https://github.com/bettercap/bettercap
synced 2025-07-11 15:46:59 -07:00
Merge pull request #38 from dimorphic/master
Fix net.sniff http URL format reporting (regression after path/hostname fix)
This commit is contained in:
commit
fa2ada828b
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue