|
|
@ -13,13 +13,12 @@ import (
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
type rawConfig struct {
|
|
|
|
type rawConfig struct {
|
|
|
|
ProxyBook map[string]string
|
|
|
|
ProxyBook map[string]string
|
|
|
|
RedirAddr string
|
|
|
|
RedirAddr string
|
|
|
|
PrivateKey string
|
|
|
|
PrivateKey string
|
|
|
|
AdminUID string
|
|
|
|
AdminUID string
|
|
|
|
DatabasePath string
|
|
|
|
DatabasePath string
|
|
|
|
BackupDirPath string
|
|
|
|
CncMode bool
|
|
|
|
CncMode bool
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// State type stores the global state of the program
|
|
|
|
// State type stores the global state of the program
|
|
|
@ -72,6 +71,7 @@ func (sta *State) ParseConfig(conf string) (err error) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if preParse.CncMode {
|
|
|
|
if preParse.CncMode {
|
|
|
|
|
|
|
|
//TODO: implement command & control mode
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
manager, err := MakeLocalManager(preParse.DatabasePath)
|
|
|
|
manager, err := MakeLocalManager(preParse.DatabasePath)
|
|
|
|