mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
refact: refactored syn.scan open port log as proper event
This commit is contained in:
parent
ce76c7258d
commit
42b08db0b0
3 changed files with 38 additions and 4 deletions
23
modules/syn_scan_event.go
Normal file
23
modules/syn_scan_event.go
Normal 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()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue