mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
34a2e8fc9a
commit
d2b54faf0b
1 changed files with 8 additions and 2 deletions
|
@ -165,10 +165,16 @@ func (p *ArpSpoofer) pktRouter(eth *layers.Ethernet, ip4 *layers.IPv4, pkt gopac
|
||||||
|
|
||||||
copy(eth.DstMAC, p.Session.Gateway.HW)
|
copy(eth.DstMAC, p.Session.Gateway.HW)
|
||||||
|
|
||||||
|
err, raw := packets.Serialize(eth, ip4)
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Error serializing packet: %s.", err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// log.Warning("After: %s\n", pkt.String())
|
// log.Warning("After: %s\n", pkt.String())
|
||||||
|
|
||||||
data := pkt.Data()
|
// data := pkt.Data()
|
||||||
if err := p.Session.Queue.Send(data); err != nil {
|
if err := p.Session.Queue.Send(raw); err != nil {
|
||||||
log.Error("Could not reinject packet: %s", err)
|
log.Error("Could not reinject packet: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue