made stop a bool channel
the build was successful Details

This commit is contained in:
konrad 2018-12-02 01:53:54 +01:00
parent ba47e39bfe
commit d0679ce785
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 5 additions and 5 deletions

View File

@ -49,15 +49,15 @@ func main() {
to redistribute it under certain conditions to redistribute it under certain conditions
=================================================`) =================================================`)
stop := make(chan int) stop := make(chan bool)
go processing.RunAirodumpNG(stop) go processing.RunAirodumpNG(stop)
go processing.UpdateActiveClients() go processing.UpdateActiveClients()
for exit := range stop { for exit := range stop {
if exit == 0 { if !exit {
continue continue
} }
os.Exit(exit) os.Exit(1)
} }
} }

View File

@ -24,10 +24,10 @@ import (
) )
// RunAirodumpNG does what it says // RunAirodumpNG does what it says
func RunAirodumpNG(stop chan int) { func RunAirodumpNG(stop chan bool) {
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 sufficient permissions. ", err) log.Println("Could not run airodump-ng. Please make sure it is installed and you have sufficient permissions. ", err)
stop <- 1 stop <- true
} }
} }