new: events.ignore and events.include now support tab completion

This commit is contained in:
evilsocket 2019-02-24 12:57:16 +01:00
commit 7e4cfbe57c
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 68 additions and 4 deletions

View file

@ -210,6 +210,62 @@ func (s *Session) HIDCompleter(prefix string) []string {
return macs
}
func (s *Session) EventsCompleter(prefix string) []string {
events := []string{""}
all := []string{
"sys.log",
"session.started",
"session.closing",
"update.available",
"mod.started",
"mod.stopped",
"endpoint.new",
"endpoint.lost",
"wifi.client.lost",
"wifi.client.probe",
"wifi.client.new",
"wifi.client.handshake",
"wifi.ap.new",
"wifi.ap.lost",
"ble.device.service.discovered",
"ble.device.characteristic.discovered",
"ble.device.connected",
"ble.device.new",
"ble.device.lost",
"ble.connection.timeout",
"hid.device.new",
"hid.device.lost",
"http.spoofed-request",
"http.spoofed-response",
"https.spoofed-request",
"https.spoofed-response",
"syn.scan",
"net.sniff.mdns",
"net.sniff.mdns",
"net.sniff.dot11",
"net.sniff.tcp",
"net.sniff.upnp",
"net.sniff.ntlm",
"net.sniff.ftp",
"net.sniff.udp",
"net.sniff.krb5",
"net.sniff.dns",
"net.sniff.teamviewer",
"net.sniff.http.request",
"net.sniff.http.response",
"net.sniff.sni",
}
for _, e := range all {
if prefix == "" || strings.HasPrefix(e, prefix) {
events = append(events, e)
}
}
return events
}
func (s *Session) Module(name string) (err error, mod Module) {
for _, m := range s.Modules {
if m.Name() == name {