refact: refactored syn.scan open port log as proper event

This commit is contained in:
evilsocket 2018-02-22 21:35:19 +01:00
parent ce76c7258d
commit 42b08db0b0
3 changed files with 38 additions and 4 deletions

23
modules/syn_scan_event.go Normal file
View file

@ -0,0 +1,23 @@
package modules
import (
"github.com/evilsocket/bettercap-ng/network"
"github.com/evilsocket/bettercap-ng/session"
)
type SynScanEvent struct {
Host *network.Endpoint
Port int
}
func NewSynScanEvent(h *network.Endpoint, port int) SynScanEvent {
return SynScanEvent{
Host: h,
Port: port,
}
}
func (e SynScanEvent) Push() {
session.I.Events.Add("syn.scan", e)
session.I.Refresh()
}