Fixed lint etc

This commit is contained in:
konrad 2018-11-29 01:08:17 +01:00
parent d58e055a37
commit 8c3383e01d
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 14 additions and 6 deletions

View File

@ -17,8 +17,15 @@
package config
const TheClientCSVHeader = `Station MAC, First time seen, Last time seen, Power, # packets, BSSID, Probed ESSIDs`
const CSVDumps = `/home/konrad/go/src/git.kolaente.de/sofaraum/client`
const SecondsUntilInactive = 120
const UpdateSecondsInterval = 2
const WifiInterface = `wlp59s0`
const (
// TheClientCSVHeader is the header of the csv file where aircrack-ng starts putting infos about the clients
TheClientCSVHeader = `Station MAC, First time seen, Last time seen, Power, # packets, BSSID, Probed ESSIDs`
// CSVDumps is the folder where aircrack-ng stores the dumps
CSVDumps = `/home/konrad/go/src/git.kolaente.de/sofaraum/client`
// SecondsUntilInactive specifies the seconds until a client is considered inactive
SecondsUntilInactive = 120
// UpdateSecondsInterval is how often the currently active clients should be processed and sent to the server
UpdateSecondsInterval = 2
// WifiInterface the wifi interface aircrack-ng listens on
WifiInterface = `wlp59s0`
)

View File

@ -27,7 +27,7 @@ import (
func RunAirodumpNG(stop chan int) {
err := exec.Command("/bin/bash", []string{"-c", "airodump-ng " + config.WifiInterface + " -w " + config.CSVDumps + "/dump --output-format csv"}...).Run()
if err != nil {
log.Println("Could not run airodump-ng. Please make sure it is installed and you have sufficent permissions. ", err)
log.Println("Could not run airodump-ng. Please make sure it is installed and you have sufficient permissions. ", err)
stop <- 1
}
}

View File

@ -23,6 +23,7 @@ import (
"time"
)
// UpdateActiveClients counts all clients and sends the number to the server. Meant to run inside a goroutine.
func UpdateActiveClients() {
for {
time.Sleep(config.UpdateSecondsInterval * time.Second)