mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
8c3500a102
commit
d7103a7907
2 changed files with 21 additions and 17 deletions
|
@ -21,20 +21,24 @@ func krb5Parser(ip *layers.IPv4, pkt gopacket.Packet, udp *layers.UDP) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
s, err := req.String()
|
if s, err := req.String(); err == nil {
|
||||||
NewSnifferEvent(
|
NewSnifferEvent(
|
||||||
pkt.Metadata().Timestamp,
|
pkt.Metadata().Timestamp,
|
||||||
"krb5",
|
"krb5",
|
||||||
ip.SrcIP.String(),
|
ip.SrcIP.String(),
|
||||||
ip.DstIP.String(),
|
ip.DstIP.String(),
|
||||||
SniffData{
|
SniffData{
|
||||||
"req": req,
|
"req": req,
|
||||||
},
|
},
|
||||||
"%s %s -> %s : %s",
|
"%s %s -> %s : %s",
|
||||||
core.W(core.BG_RED+core.FG_BLACK, "krb-as-req"),
|
core.W(core.BG_RED+core.FG_BLACK, "krb-as-req"),
|
||||||
vIP(ip.SrcIP),
|
vIP(ip.SrcIP),
|
||||||
vIP(ip.DstIP),
|
vIP(ip.DstIP),
|
||||||
s,
|
s,
|
||||||
).Push()
|
).Push()
|
||||||
return true
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,6 @@ type bintree struct {
|
||||||
Func func() (*asset, error)
|
Func func() (*asset, error)
|
||||||
Children map[string]*bintree
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
|
|
||||||
var _bintree = &bintree{nil, map[string]*bintree{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"net": &bintree{nil, map[string]*bintree{
|
"net": &bintree{nil, map[string]*bintree{
|
||||||
"oui.dat": &bintree{netOuiDat, map[string]*bintree{}},
|
"oui.dat": &bintree{netOuiDat, map[string]*bintree{}},
|
||||||
|
@ -235,3 +234,4 @@ func _filePath(dir, name string) string {
|
||||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue