mirror of
https://github.com/bettercap/bettercap
synced 2025-07-08 05:51:37 -07:00
refact: refactored to use islazy and updated deps
This commit is contained in:
parent
a2b3ee79fb
commit
d070445225
238 changed files with 12662 additions and 1586 deletions
|
@ -1,7 +1,7 @@
|
|||
package packets
|
||||
|
||||
import (
|
||||
"github.com/bettercap/bettercap/core"
|
||||
"github.com/evilsocket/islazy/str"
|
||||
|
||||
"github.com/google/gopacket"
|
||||
"github.com/google/gopacket/layers"
|
||||
|
@ -28,7 +28,7 @@ func NBNSGetMeta(pkt gopacket.Packet) map[string]string {
|
|||
if ludp := pkt.Layer(layers.LayerTypeUDP); ludp != nil {
|
||||
if udp := ludp.(*layers.UDP); udp != nil && udp.SrcPort == NBNSPort && len(udp.Payload) >= NBNSMinRespSize {
|
||||
return map[string]string{
|
||||
"nbns:hostname": core.Trim(string(udp.Payload[57:72])),
|
||||
"nbns:hostname": str.Trim(string(udp.Payload[57:72])),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue