mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
fix: fixed net.sniff http reporting
This commit is contained in:
parent
4756b885ec
commit
ab9e86abd1
1 changed files with 6 additions and 6 deletions
|
@ -27,8 +27,8 @@ func httpParser(ip *layers.IPv4, pkt gopacket.Packet, tcp *layers.TCP) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
method := string(m[1])
|
method := string(m[1])
|
||||||
hostname := string(m[2])
|
hostname := string(m[3])
|
||||||
path := string(m[3])
|
path := string(m[2])
|
||||||
ua := ""
|
ua := ""
|
||||||
mu := uaRe.FindSubmatch(data)
|
mu := uaRe.FindSubmatch(data)
|
||||||
if len(mu) == 2 {
|
if len(mu) == 2 {
|
||||||
|
@ -47,10 +47,10 @@ func httpParser(ip *layers.IPv4, pkt gopacket.Packet, tcp *layers.TCP) bool {
|
||||||
ip.SrcIP.String(),
|
ip.SrcIP.String(),
|
||||||
hostname,
|
hostname,
|
||||||
SniffData{
|
SniffData{
|
||||||
"Method": method,
|
"method": method,
|
||||||
"Hostname": hostname,
|
"host": hostname,
|
||||||
"URL": url,
|
"path": url,
|
||||||
"UA": ua,
|
"agent": ua,
|
||||||
},
|
},
|
||||||
"[%s] %s %s %s %s %s",
|
"[%s] %s %s %s %s %s",
|
||||||
vTime(pkt.Metadata().Timestamp),
|
vTime(pkt.Metadata().Timestamp),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue