even moar refactor
This commit is contained in:
parent
d6cd817133
commit
93db0f17a1
11 changed files with 111 additions and 170 deletions
|
|
@ -171,4 +171,14 @@ func RecoverMesh(agentID string) {
|
|||
|
||||
func UninstallCleanup() {}
|
||||
|
||||
func RunMigrations() {}
|
||||
func RunMigrations() {}
|
||||
|
||||
func GetPython(force bool) {}
|
||||
|
||||
func ChecksRunning() bool { return false }
|
||||
|
||||
func RunTask(id int) error { return nil }
|
||||
|
||||
func installMesh(meshbin, exe, proxy string) (string, error) {
|
||||
return "not implemented", nil
|
||||
}
|
||||
31
agent/tactical/tactical_windows.go
Normal file
31
agent/tactical/tactical_windows.go
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
package tactical
|
||||
|
||||
func NewAgentConfig() *rmm.AgentConfig {
|
||||
k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\TacticalRMM`, registry.ALL_ACCESS)
|
||||
|
||||
if err != nil {
|
||||
return &rmm.AgentConfig{}
|
||||
}
|
||||
|
||||
baseurl, _, _ := k.GetStringValue("BaseURL")
|
||||
agentid, _, _ := k.GetStringValue("AgentID")
|
||||
apiurl, _, _ := k.GetStringValue("ApiURL")
|
||||
token, _, _ := k.GetStringValue("Token")
|
||||
agentpk, _, _ := k.GetStringValue("AgentPK")
|
||||
pk, _ := strconv.Atoi(agentpk)
|
||||
cert, _, _ := k.GetStringValue("Cert")
|
||||
proxy, _, _ := k.GetStringValue("Proxy")
|
||||
customMeshDir, _, _ := k.GetStringValue("MeshDir")
|
||||
|
||||
return &rmm.AgentConfig{
|
||||
BaseURL: baseurl,
|
||||
AgentID: agentid,
|
||||
APIURL: apiurl,
|
||||
Token: token,
|
||||
AgentPK: agentpk,
|
||||
PK: pk,
|
||||
Cert: cert,
|
||||
Proxy: proxy,
|
||||
CustomMeshDir: customMeshDir,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue