Fixed lint etc
This commit is contained in:
parent
d58e055a37
commit
8c3383e01d
|
@ -17,8 +17,15 @@
|
||||||
|
|
||||||
package config
|
package config
|
||||||
|
|
||||||
const TheClientCSVHeader = `Station MAC, First time seen, Last time seen, Power, # packets, BSSID, Probed ESSIDs`
|
const (
|
||||||
const CSVDumps = `/home/konrad/go/src/git.kolaente.de/sofaraum/client`
|
// TheClientCSVHeader is the header of the csv file where aircrack-ng starts putting infos about the clients
|
||||||
const SecondsUntilInactive = 120
|
TheClientCSVHeader = `Station MAC, First time seen, Last time seen, Power, # packets, BSSID, Probed ESSIDs`
|
||||||
const UpdateSecondsInterval = 2
|
// CSVDumps is the folder where aircrack-ng stores the dumps
|
||||||
const WifiInterface = `wlp59s0`
|
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`
|
||||||
|
)
|
||||||
|
|
|
@ -27,7 +27,7 @@ import (
|
||||||
func RunAirodumpNG(stop chan int) {
|
func RunAirodumpNG(stop chan int) {
|
||||||
err := exec.Command("/bin/bash", []string{"-c", "airodump-ng " + config.WifiInterface + " -w " + config.CSVDumps + "/dump --output-format csv"}...).Run()
|
err := exec.Command("/bin/bash", []string{"-c", "airodump-ng " + config.WifiInterface + " -w " + config.CSVDumps + "/dump --output-format csv"}...).Run()
|
||||||
if err != nil {
|
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
|
stop <- 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// UpdateActiveClients counts all clients and sends the number to the server. Meant to run inside a goroutine.
|
||||||
func UpdateActiveClients() {
|
func UpdateActiveClients() {
|
||||||
for {
|
for {
|
||||||
time.Sleep(config.UpdateSecondsInterval * time.Second)
|
time.Sleep(config.UpdateSecondsInterval * time.Second)
|
||||||
|
|
Loading…
Reference in New Issue