From 5a6a5fbbdf1821890ba372cca0375431a4583efe Mon Sep 17 00:00:00 2001 From: Krypton Date: Tue, 15 Jul 2025 21:19:00 +0200 Subject: [PATCH 1/3] fix: Callback signature check --- modules/packet_proxy/packet_proxy_linux.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/packet_proxy/packet_proxy_linux.go b/modules/packet_proxy/packet_proxy_linux.go index e69fe485..9a40fcff 100644 --- a/modules/packet_proxy/packet_proxy_linux.go +++ b/modules/packet_proxy/packet_proxy_linux.go @@ -16,15 +16,13 @@ import ( "github.com/evilsocket/islazy/fs" ) -type hookFunc func(q *nfqueue.Nfqueue, a nfqueue.Attribute) int - type PacketProxy struct { session.SessionModule chainName string rule string queue *nfqueue.Nfqueue queueNum int - queueCb hookFunc + queueCb func(q *nfqueue.Nfqueue, a nfqueue.Attribute) int pluginPath string plugin *plugin.Plugin } @@ -151,7 +149,7 @@ func (mod *PacketProxy) Configure() (err error) { return } else if sym, err = mod.plugin.Lookup("OnPacket"); err != nil { return - } else if mod.queueCb, ok = sym.(hookFunc); !ok { + } else if mod.queueCb, ok = sym.(func(q *nfqueue.Nfqueue, a nfqueue.Attribute) int); !ok { return fmt.Errorf("Symbol OnPacket is not a valid callback function.") } From 0f68fcca8bcb405ec904527516d04a166cc5caec Mon Sep 17 00:00:00 2001 From: Krypton Date: Tue, 15 Jul 2025 22:10:28 +0200 Subject: [PATCH 2/3] fix: Small typo in `ticker off` description --- modules/ticker/ticker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticker/ticker.go b/modules/ticker/ticker.go index e629d2f0..34c4c02b 100644 --- a/modules/ticker/ticker.go +++ b/modules/ticker/ticker.go @@ -43,7 +43,7 @@ func NewTicker(s *session.Session) *Ticker { })) mod.AddHandler(session.NewModuleHandler("ticker off", "", - "Stop the maint icker.", + "Stop the main ticker.", func(args []string) error { return mod.Stop() })) From faee64a2c02893be129aa31e161cef5b0da3f70f Mon Sep 17 00:00:00 2001 From: Krypton Date: Wed, 16 Jul 2025 21:01:15 +0200 Subject: [PATCH 3/3] fix: Consistency and small typo --- modules/wifi/wifi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/wifi/wifi.go b/modules/wifi/wifi.go index 0cd0338f..2a000f4b 100644 --- a/modules/wifi/wifi.go +++ b/modules/wifi/wifi.go @@ -265,8 +265,8 @@ func NewWiFiModule(s *session.Session) *WiFiModule { mod.AddHandler(probe) - channelSwitchAnnounce := session.NewModuleHandler("wifi.channel_switch_announce bssid channel ", `wifi\.channel_switch_announce ((?:[a-fA-F0-9:]{11,}))\s+((?:[0-9]+))`, - "Start a 802.11 channel hop attack, all client will be force to change the channel lead to connection down.", + channelSwitchAnnounce := session.NewModuleHandler("wifi.channel_switch_announce BSSID CHANNEL ", `wifi\.channel_switch_announce ((?:[a-fA-F0-9:]{11,}))\s+((?:[0-9]+))`, + "Start a 802.11 channel hop attack, all client will be forced to change the channel lead to connection down.", func(args []string) error { bssid, err := net.ParseMAC(args[0]) if err != nil {