diff --git a/modules/api_rest.go b/modules/api_rest.go index 4572fb23..43c2c803 100644 --- a/modules/api_rest.go +++ b/modules/api_rest.go @@ -149,8 +149,8 @@ func (api *RestAPI) Configure() error { return err } } else { - log.Info("Loading TLS key from %s", api.keyFile) - log.Info("Loading TLS certificate from %s", api.certFile) + log.Info("loading TLS key from %s", api.keyFile) + log.Info("loading TLS certificate from %s", api.certFile) } api.server.Addr = fmt.Sprintf("%s:%d", ip, port) diff --git a/modules/arp_spoof.go b/modules/arp_spoof.go index b664d0ba..983d38d6 100644 --- a/modules/arp_spoof.go +++ b/modules/arp_spoof.go @@ -154,7 +154,7 @@ func (p *ArpSpoofer) Start() error { func (p *ArpSpoofer) unSpoof() error { nTargets := len(p.addresses) + len(p.macs) - log.Info("Restoring ARP cache of %d targets.", nTargets) + log.Info("restoring ARP cache of %d targets.", nTargets) p.sendArp(p.Session.Gateway.IP, p.Session.Gateway.HW, false, false) if p.internal { @@ -174,7 +174,7 @@ func (p *ArpSpoofer) unSpoof() error { func (p *ArpSpoofer) Stop() error { return p.SetRunning(false, func() { - log.Info("Waiting for ARP spoofer to stop ...") + log.Info("waiting for ARP spoofer to stop ...") p.unSpoof() p.ban = false p.waitGroup.Wait() diff --git a/modules/events_ignore_list.go b/modules/events_ignore_list.go index 960367d0..6b70de42 100644 --- a/modules/events_ignore_list.go +++ b/modules/events_ignore_list.go @@ -11,7 +11,7 @@ import ( ) var ( - ErrEmptyExpression = errors.New("Expression can not be empty.") + ErrEmptyExpression = errors.New("expression can not be empty") ) type IgnoreFilter string @@ -51,7 +51,7 @@ func (l *IgnoreList) Add(expr string) (err error) { // first check for duplicates for _, filter := range l.filters { if filter.Matches(expr) { - return fmt.Errorf("Filter '%s' already matches the expression '%s'.", filter, expr) + return fmt.Errorf("filter '%s' already matches the expression '%s'", filter, expr) } } @@ -79,7 +79,7 @@ func (l *IgnoreList) Remove(expr string) (err error) { } if len(newList) == len(l.filters) { - return fmt.Errorf("Expression '%s' did not match any filter.", expr) + return fmt.Errorf("expression '%s' did not match any filter", expr) } // swap diff --git a/modules/events_stream.go b/modules/events_stream.go index c3a7b161..3fb42bfe 100644 --- a/modules/events_stream.go +++ b/modules/events_stream.go @@ -162,7 +162,7 @@ func (s *EventsStream) Start() error { if !s.ignoreList.Ignored(e) { s.View(e, true) } else { - log.Debug("Skipping ignored event %v", e) + log.Debug("skipping ignored event %v", e) } case <-s.quit: @@ -197,9 +197,9 @@ func (s *EventsStream) Show(limit int) error { func (s *EventsStream) startWaitingFor(tag string, timeout int) error { if timeout == 0 { - log.Info("Waiting for event %s ...", core.Green(tag)) + log.Info("waiting for event %s ...", core.Green(tag)) } else { - log.Info("Waiting for event %s for %d seconds ...", core.Green(tag), timeout) + log.Info("waiting for event %s for %d seconds ...", core.Green(tag), timeout) go func() { time.Sleep(time.Duration(timeout) * time.Second) s.waitFor = "" @@ -213,7 +213,7 @@ func (s *EventsStream) startWaitingFor(tag string, timeout int) error { if event == nil { return fmt.Errorf("'events.waitFor %s %d' timed out.", tag, timeout) } else { - log.Debug("Got event: %v", event) + log.Debug("got event: %v", event) } return nil diff --git a/modules/events_view.go b/modules/events_view.go index a16f4792..d690b013 100644 --- a/modules/events_view.go +++ b/modules/events_view.go @@ -37,7 +37,7 @@ func (s *EventsStream) viewWiFiEvent(e session.Event) { } if e.Tag == "wifi.ap.new" { - fmt.Fprintf(s.output, "[%s] [%s] WiFi access point %s%s detected as %s%s.\n", + fmt.Fprintf(s.output, "[%s] [%s] wifi access point %s%s detected as %s%s.\n", e.Time.Format(eventTimeFormat), core.Green(e.Tag), core.Bold(ap.ESSID()), @@ -45,7 +45,7 @@ func (s *EventsStream) viewWiFiEvent(e session.Event) { core.Green(ap.BSSID()), core.Dim(vend)) } else if e.Tag == "wifi.ap.lost" { - fmt.Fprintf(s.output, "[%s] [%s] WiFi access point %s (%s) lost.\n", + fmt.Fprintf(s.output, "[%s] [%s] wifi access point %s (%s) lost.\n", e.Time.Format(eventTimeFormat), core.Green(e.Tag), core.Red(ap.ESSID()), @@ -69,7 +69,7 @@ func (s *EventsStream) viewWiFiEvent(e session.Event) { rssi = fmt.Sprintf(" (%d dBm)", probe.RSSI) } - fmt.Fprintf(s.output, "[%s] [%s] Station %s%s is probing for SSID %s%s\n", + fmt.Fprintf(s.output, "[%s] [%s] station %s%s is probing for SSID %s%s\n", e.Time.Format(eventTimeFormat), core.Green(e.Tag), probe.FromAddr.String(), @@ -79,7 +79,7 @@ func (s *EventsStream) viewWiFiEvent(e session.Event) { } } -func (s *EventsStream) viewEndpointEvent(e session.Event) { +func (s *EventsStream) viewendpointEvent(e session.Event) { t := e.Data.(*network.Endpoint) vend := "" name := "" @@ -95,7 +95,7 @@ func (s *EventsStream) viewEndpointEvent(e session.Event) { } if e.Tag == "endpoint.new" { - fmt.Fprintf(s.output, "[%s] [%s] Endpoint %s%s detected as %s%s.\n", + fmt.Fprintf(s.output, "[%s] [%s] endpoint %s%s detected as %s%s.\n", e.Time.Format(eventTimeFormat), core.Green(e.Tag), core.Bold(t.IpAddress), @@ -103,7 +103,7 @@ func (s *EventsStream) viewEndpointEvent(e session.Event) { core.Green(t.HwAddress), core.Dim(vend)) } else if e.Tag == "endpoint.lost" { - fmt.Fprintf(s.output, "[%s] [%s] Endpoint %s%s lost.\n", + fmt.Fprintf(s.output, "[%s] [%s] endpoint %s%s lost.\n", e.Time.Format(eventTimeFormat), core.Green(e.Tag), core.Red(t.IpAddress), @@ -159,7 +159,7 @@ func (s *EventsStream) viewSnifferEvent(e session.Event) { func (s *EventsStream) viewSynScanEvent(e session.Event) { se := e.Data.(SynScanEvent) - fmt.Fprintf(s.output, "[%s] [%s] Found open port %d for %s\n", + fmt.Fprintf(s.output, "[%s] [%s] found open port %d for %s\n", e.Time.Format(eventTimeFormat), core.Green(e.Tag), se.Port, @@ -169,7 +169,7 @@ func (s *EventsStream) viewSynScanEvent(e session.Event) { func (s *EventsStream) viewUpdateEvent(e session.Event) { update := e.Data.(*github.RepositoryRelease) - fmt.Fprintf(s.output, "[%s] [%s] An update to version %s is available at %s\n", + fmt.Fprintf(s.output, "[%s] [%s] an update to version %s is available at %s\n", e.Time.Format(eventTimeFormat), core.Bold(core.Yellow(e.Tag)), core.Bold(*update.TagName), @@ -180,7 +180,7 @@ func (s *EventsStream) View(e session.Event, refresh bool) { if e.Tag == "sys.log" { s.viewLogEvent(e) } else if strings.HasPrefix(e.Tag, "endpoint.") { - s.viewEndpointEvent(e) + s.viewendpointEvent(e) } else if strings.HasPrefix(e.Tag, "wifi.") { s.viewWiFiEvent(e) } else if strings.HasPrefix(e.Tag, "ble.") { diff --git a/modules/events_view_ble.go b/modules/events_view_ble.go index 41886327..4d65d05b 100644 --- a/modules/events_view_ble.go +++ b/modules/events_view_ble.go @@ -23,7 +23,7 @@ func (s *EventsStream) viewBLEEvent(e session.Event) { vend = fmt.Sprintf(" (%s)", core.Yellow(vend)) } - fmt.Fprintf(s.output, "[%s] [%s] New BLE device%s detected as %s%s %s.\n", + fmt.Fprintf(s.output, "[%s] [%s] new BLE device%s detected as %s%s %s.\n", e.Time.Format(eventTimeFormat), core.Green(e.Tag), name, diff --git a/modules/http_proxy_script.go b/modules/http_proxy_script.go index c618fbbb..61a1f115 100644 --- a/modules/http_proxy_script.go +++ b/modules/http_proxy_script.go @@ -58,7 +58,7 @@ func LoadHttpProxyScriptSource(path, source string, sess *session.Session) (err } func LoadHttpProxyScript(path string, sess *session.Session) (err error, s *HttpProxyScript) { - log.Info("Loading proxy script %s ...", path) + log.Info("loading proxy script %s ...", path) raw, err := ioutil.ReadFile(path) if err != nil { diff --git a/modules/http_server.go b/modules/http_server.go index a06e5865..18de47c9 100644 --- a/modules/http_server.go +++ b/modules/http_server.go @@ -145,8 +145,8 @@ func (httpd *HttpServer) Configure() error { return err } } else { - log.Info("Loading server TLS key from %s", keyFile) - log.Info("Loading server TLS certificate from %s", certFile) + log.Info("loading server TLS key from %s", keyFile) + log.Info("loading server TLS certificate from %s", certFile) } } diff --git a/modules/https_proxy.go b/modules/https_proxy.go index 29a3da2c..c9e17dc8 100644 --- a/modules/https_proxy.go +++ b/modules/https_proxy.go @@ -132,8 +132,8 @@ func (p *HttpsProxy) Configure() error { return err } } else { - log.Info("Loading proxy certification authority TLS key from %s", keyFile) - log.Info("Loading proxy certification authority TLS certificate from %s", certFile) + log.Info("loading proxy certification authority TLS key from %s", keyFile) + log.Info("loading proxy certification authority TLS certificate from %s", certFile) } return p.proxy.ConfigureTLS(address, proxyPort, httpPort, scriptPath, certFile, keyFile, jsToInject, stripSSL) diff --git a/modules/packet_proxy_linux_amd64.go b/modules/packet_proxy_linux_amd64.go index 76f603a0..a67cf8f1 100644 --- a/modules/packet_proxy_linux_amd64.go +++ b/modules/packet_proxy_linux_amd64.go @@ -146,7 +146,7 @@ func (pp *PacketProxy) Configure() (err error) { return fmt.Errorf("%s does not exist.", pp.pluginPath) } - log.Info("Loading packet proxy plugin from %s ...", pp.pluginPath) + log.Info("loading packet proxy plugin from %s ...", pp.pluginPath) var ok bool var sym plugin.Symbol diff --git a/modules/tcp_proxy_script.go b/modules/tcp_proxy_script.go index a3eaba41..af50c096 100644 --- a/modules/tcp_proxy_script.go +++ b/modules/tcp_proxy_script.go @@ -39,7 +39,7 @@ func LoadTcpProxyScriptSource(path, source string, sess *session.Session) (err e } func LoadTcpProxyScript(path string, sess *session.Session) (err error, s *TcpProxyScript) { - log.Info("Loading TCP proxy script %s ...", path) + log.Info("loading TCP proxy script %s ...", path) raw, err := ioutil.ReadFile(path) if err != nil {