client/main.go

64 lines
2.1 KiB
Go
Raw Normal View History

2018-11-28 22:20:12 +00:00
// Sofaraum client is the client software which collects statistics about
// wifi devices nearby and then sends them to the Sofaraum Server.
// Copyright (c) 2018.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
2018-11-14 14:24:48 +00:00
package main
import (
2018-11-29 00:41:00 +00:00
"fmt"
2018-11-28 23:57:16 +00:00
"git.kolaente.de/sofaraum/client/pkg/processing"
"os"
2018-11-14 14:24:48 +00:00
)
2018-11-29 00:41:00 +00:00
// Version sets the version. Will be overwritten by drone or when building with the makefile
var Version = "0.1"
2018-11-14 14:24:48 +00:00
func main() {
2018-11-29 00:41:00 +00:00
fmt.Println(`
___.--------'´´´´´´:´´´´´´'--------.___
( | : | )
\ ,;,,, : | /
|\%%%%\___________:__________/~~~~~/|
/ ,\%%%%\ | / @*@ /, \
/_ / ´´´´´ | ~~~~~~ \ _\
(@l) | (@l)
||__________________|__________________||
||_____________________________________||
/_|_____________________________________|_\
=================================================
Sofaraum Client Version ` + Version + `
Copyright (C) 2018 K. Langenberg
This program comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome
to redistribute it under certain conditions
=================================================`)
2018-12-02 00:53:54 +00:00
stop := make(chan bool)
2018-11-28 23:57:16 +00:00
go processing.RunAirodumpNG(stop)
2018-11-28 23:20:03 +00:00
2018-11-28 23:57:16 +00:00
go processing.UpdateActiveClients()
2018-11-14 22:14:43 +00:00
2018-11-28 23:20:03 +00:00
for exit := range stop {
2018-12-02 00:53:54 +00:00
if !exit {
2018-11-28 23:20:03 +00:00
continue
2018-11-14 22:14:43 +00:00
}
2018-12-02 00:53:54 +00:00
os.Exit(1)
2018-11-14 22:14:43 +00:00
}
}