Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
697e112536 | ||
|
|
687e890a10 | ||
|
|
c64fc857c9 | ||
|
|
5fef58f764 | ||
|
|
ecad4d02d9 |
152
agent/agent.go
152
agent/agent.go
@@ -15,6 +15,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
@@ -58,6 +59,9 @@ type Agent struct {
|
||||
MeshSystemEXE string
|
||||
MeshSVC string
|
||||
PyBin string
|
||||
PyVer string
|
||||
PyBaseDir string
|
||||
PyDir string
|
||||
NuBin string
|
||||
DenoBin string
|
||||
AgentHeader string
|
||||
@@ -116,12 +120,24 @@ func New(logger *logrus.Logger, version string) *Agent {
|
||||
hostname = info.Hostname
|
||||
}
|
||||
|
||||
var pybin string
|
||||
switch runtime.GOARCH {
|
||||
case "amd64":
|
||||
pybin = filepath.Join(pd, "py38-x64", "python.exe")
|
||||
case "386":
|
||||
pybin = filepath.Join(pd, "py38-x32", "python.exe")
|
||||
pyver := "n/a"
|
||||
pybin := "n/a"
|
||||
pyBaseDir := "n/a"
|
||||
pydir := "n/a"
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
major := info.OS.Major
|
||||
minor := info.OS.Minor
|
||||
if major > 6 || (major == 6 && minor >= 3) {
|
||||
// Windows 8.1 or higher
|
||||
pyver = "3.11.9"
|
||||
} else {
|
||||
pyver = "3.8.7"
|
||||
}
|
||||
|
||||
pydir = "py" + pyver + "_" + runtime.GOARCH
|
||||
pyBaseDir = filepath.Join(pd, "python")
|
||||
pybin = filepath.Join(pyBaseDir, pydir, "python.exe")
|
||||
}
|
||||
|
||||
var nuBin string
|
||||
@@ -254,6 +270,9 @@ func New(logger *logrus.Logger, version string) *Agent {
|
||||
MeshSystemEXE: MeshSysExe,
|
||||
MeshSVC: meshSvcName,
|
||||
PyBin: pybin,
|
||||
PyVer: pyver,
|
||||
PyBaseDir: pyBaseDir,
|
||||
PyDir: pydir,
|
||||
NuBin: nuBin,
|
||||
DenoBin: denoBin,
|
||||
Headers: headers,
|
||||
@@ -628,3 +647,124 @@ func createWinTempDir() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *Agent) RunTask(id int) error {
|
||||
data := rmm.AutomatedTask{}
|
||||
url := fmt.Sprintf("/api/v3/%d/%s/taskrunner/", id, a.AgentID)
|
||||
r1, gerr := a.rClient.R().Get(url)
|
||||
if gerr != nil {
|
||||
a.Logger.Debugln(gerr)
|
||||
return gerr
|
||||
}
|
||||
|
||||
if r1.IsError() {
|
||||
a.Logger.Debugln("Run Task:", r1.String())
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(r1.Body(), &data); err != nil {
|
||||
a.Logger.Debugln(err)
|
||||
return err
|
||||
}
|
||||
|
||||
start := time.Now()
|
||||
|
||||
type TaskResult struct {
|
||||
Stdout string `json:"stdout"`
|
||||
Stderr string `json:"stderr"`
|
||||
RetCode int `json:"retcode"`
|
||||
ExecTime float64 `json:"execution_time"`
|
||||
}
|
||||
|
||||
payload := TaskResult{}
|
||||
|
||||
// loop through all task actions
|
||||
for _, action := range data.TaskActions {
|
||||
|
||||
action_start := time.Now()
|
||||
if action.ActionType == "script" {
|
||||
stdout, stderr, retcode, err := a.RunScript(action.Code, action.Shell, action.Args, action.Timeout, action.RunAsUser, action.EnvVars, action.NushellEnableConfig, action.DenoDefaultPermissions)
|
||||
|
||||
if err != nil {
|
||||
a.Logger.Debugln(err)
|
||||
}
|
||||
|
||||
// add text to stdout showing which script ran if more than 1 script
|
||||
action_exec_time := time.Since(action_start).Seconds()
|
||||
|
||||
if len(data.TaskActions) > 1 {
|
||||
payload.Stdout += fmt.Sprintf("\n------------\nRunning Script: %s. Execution Time: %f\n------------\n\n", action.ScriptName, action_exec_time)
|
||||
}
|
||||
|
||||
// save results
|
||||
payload.Stdout += stdout
|
||||
payload.Stderr += stderr
|
||||
payload.RetCode = retcode
|
||||
|
||||
if !data.ContinueOnError && stderr != "" {
|
||||
break
|
||||
}
|
||||
|
||||
} else if action.ActionType == "cmd" {
|
||||
var stdout, stderr string
|
||||
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
out, err := CMDShell(action.Shell, []string{}, action.Command, action.Timeout, false, action.RunAsUser)
|
||||
if err != nil {
|
||||
a.Logger.Debugln(err)
|
||||
}
|
||||
stdout = out[0]
|
||||
stderr = out[1]
|
||||
|
||||
if stderr == "" {
|
||||
payload.RetCode = 0
|
||||
} else {
|
||||
payload.RetCode = 1
|
||||
}
|
||||
|
||||
default:
|
||||
opts := a.NewCMDOpts()
|
||||
opts.Shell = action.Shell
|
||||
opts.Command = action.Command
|
||||
opts.Timeout = time.Duration(action.Timeout)
|
||||
out := a.CmdV2(opts)
|
||||
|
||||
if out.Status.Error != nil {
|
||||
a.Logger.Debugln("RunTask() cmd: ", out.Status.Error.Error())
|
||||
}
|
||||
|
||||
stdout = out.Stdout
|
||||
stderr = out.Stderr
|
||||
payload.RetCode = out.Status.Exit
|
||||
}
|
||||
|
||||
if len(data.TaskActions) > 1 {
|
||||
action_exec_time := time.Since(action_start).Seconds()
|
||||
|
||||
// add text to stdout showing which script ran
|
||||
payload.Stdout += fmt.Sprintf("\n------------\nRunning Command: %s. Execution Time: %f\n------------\n\n", action.Command, action_exec_time)
|
||||
}
|
||||
// save results
|
||||
payload.Stdout += stdout
|
||||
payload.Stderr += stderr
|
||||
|
||||
if payload.RetCode != 0 {
|
||||
if !data.ContinueOnError {
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
a.Logger.Debugln("Invalid Action", action)
|
||||
}
|
||||
}
|
||||
|
||||
payload.ExecTime = time.Since(start).Seconds()
|
||||
|
||||
_, perr := a.rClient.R().SetBody(payload).Patch(url)
|
||||
if perr != nil {
|
||||
a.Logger.Debugln(perr)
|
||||
return perr
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -941,8 +941,6 @@ func (a *Agent) GetInstalledSoftware() []trmm.WinSoftwareList { return []trmm.Wi
|
||||
|
||||
func (a *Agent) ChecksRunning() bool { return false }
|
||||
|
||||
func (a *Agent) RunTask(id int) error { return nil }
|
||||
|
||||
func (a *Agent) InstallChoco() {}
|
||||
|
||||
func (a *Agent) InstallWithChoco(name string) (string, error) { return "", nil }
|
||||
|
||||
@@ -752,6 +752,15 @@ func (a *Agent) AgentUninstall(code string) {
|
||||
|
||||
// RunMigrations cleans up unused stuff from older agents
|
||||
func (a *Agent) RunMigrations() {
|
||||
|
||||
// changed pybin dirs in v2.8.0
|
||||
for _, i := range []string{"py38-x64", "py38-x32"} {
|
||||
py := filepath.Join(a.ProgramDir, i)
|
||||
if trmm.FileExists(py) {
|
||||
os.RemoveAll(py)
|
||||
}
|
||||
}
|
||||
|
||||
for _, i := range []string{"nssm.exe", "nssm-x86.exe"} {
|
||||
nssm := filepath.Join(a.ProgramDir, i)
|
||||
if trmm.FileExists(nssm) {
|
||||
@@ -845,29 +854,22 @@ func (a *Agent) GetPython(force bool) {
|
||||
return
|
||||
}
|
||||
|
||||
if force {
|
||||
os.RemoveAll(a.PyBaseDir)
|
||||
}
|
||||
|
||||
sleepDelay := randRange(1, 10)
|
||||
a.Logger.Debugf("GetPython() sleeping for %v seconds", sleepDelay)
|
||||
a.Logger.Debugf("GetPython() sleeping for %v seconds\n", sleepDelay)
|
||||
time.Sleep(time.Duration(sleepDelay) * time.Second)
|
||||
|
||||
var archZip string
|
||||
var folder string
|
||||
switch runtime.GOARCH {
|
||||
case "amd64":
|
||||
archZip = "py38-x64.zip"
|
||||
folder = "py38-x64"
|
||||
case "386":
|
||||
archZip = "py38-x32.zip"
|
||||
folder = "py38-x32"
|
||||
if !trmm.FileExists(a.PyBaseDir) {
|
||||
os.MkdirAll(a.PyBaseDir, 0775)
|
||||
}
|
||||
pyFolder := filepath.Join(a.ProgramDir, folder)
|
||||
pyZip := filepath.Join(a.ProgramDir, archZip)
|
||||
a.Logger.Debugln(pyZip)
|
||||
a.Logger.Debugln(a.PyBin)
|
||||
defer os.Remove(pyZip)
|
||||
|
||||
if force {
|
||||
os.RemoveAll(pyFolder)
|
||||
}
|
||||
archZip := a.PyDir + ".zip"
|
||||
|
||||
pyZip := filepath.Join(a.PyBaseDir, archZip)
|
||||
defer os.Remove(pyZip)
|
||||
|
||||
rClient := resty.New()
|
||||
rClient.SetTimeout(20 * time.Minute)
|
||||
@@ -878,7 +880,7 @@ func (a *Agent) GetPython(force bool) {
|
||||
rClient.SetProxy(a.Proxy)
|
||||
}
|
||||
|
||||
url := fmt.Sprintf("https://github.com/amidaware/rmmagent/releases/download/v2.0.0/%s", archZip)
|
||||
url := fmt.Sprintf("https://github.com/amidaware/rmmagent/releases/download/v2.8.0/%s", archZip)
|
||||
a.Logger.Debugln(url)
|
||||
r, err := rClient.R().SetOutput(pyZip).Get(url)
|
||||
if err != nil {
|
||||
@@ -890,7 +892,7 @@ func (a *Agent) GetPython(force bool) {
|
||||
return
|
||||
}
|
||||
|
||||
err = Unzip(pyZip, a.ProgramDir)
|
||||
err = Unzip(pyZip, a.PyBaseDir)
|
||||
if err != nil {
|
||||
a.Logger.Errorln(err)
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ type AgentCheckInConfig struct {
|
||||
}
|
||||
|
||||
func (a *Agent) AgentSvc(nc *nats.Conn) {
|
||||
a.RunMigrations()
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
go a.GetPython(false)
|
||||
|
||||
@@ -58,8 +60,6 @@ func (a *Agent) AgentSvc(nc *nats.Conn) {
|
||||
}
|
||||
}
|
||||
|
||||
a.RunMigrations()
|
||||
|
||||
sleepDelay := randRange(7, 25)
|
||||
a.Logger.Debugf("AgentSvc() sleeping for %v seconds", sleepDelay)
|
||||
time.Sleep(time.Duration(sleepDelay) * time.Second)
|
||||
|
||||
@@ -12,7 +12,6 @@ https://license.tacticalrmm.com
|
||||
package agent
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -20,112 +19,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/amidaware/taskmaster"
|
||||
|
||||
rmm "github.com/amidaware/rmmagent/shared"
|
||||
"github.com/rickb777/date/period"
|
||||
)
|
||||
|
||||
func (a *Agent) RunTask(id int) error {
|
||||
data := rmm.AutomatedTask{}
|
||||
url := fmt.Sprintf("/api/v3/%d/%s/taskrunner/", id, a.AgentID)
|
||||
r1, gerr := a.rClient.R().Get(url)
|
||||
if gerr != nil {
|
||||
a.Logger.Debugln(gerr)
|
||||
return gerr
|
||||
}
|
||||
|
||||
if r1.IsError() {
|
||||
a.Logger.Debugln("Run Task:", r1.String())
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(r1.Body(), &data); err != nil {
|
||||
a.Logger.Debugln(err)
|
||||
return err
|
||||
}
|
||||
|
||||
start := time.Now()
|
||||
|
||||
type TaskResult struct {
|
||||
Stdout string `json:"stdout"`
|
||||
Stderr string `json:"stderr"`
|
||||
RetCode int `json:"retcode"`
|
||||
ExecTime float64 `json:"execution_time"`
|
||||
}
|
||||
|
||||
payload := TaskResult{}
|
||||
|
||||
// loop through all task actions
|
||||
for _, action := range data.TaskActions {
|
||||
|
||||
action_start := time.Now()
|
||||
if action.ActionType == "script" {
|
||||
stdout, stderr, retcode, err := a.RunScript(action.Code, action.Shell, action.Args, action.Timeout, action.RunAsUser, action.EnvVars, action.NushellEnableConfig, action.DenoDefaultPermissions)
|
||||
|
||||
if err != nil {
|
||||
a.Logger.Debugln(err)
|
||||
}
|
||||
|
||||
// add text to stdout showing which script ran if more than 1 script
|
||||
action_exec_time := time.Since(action_start).Seconds()
|
||||
|
||||
if len(data.TaskActions) > 1 {
|
||||
payload.Stdout += fmt.Sprintf("\n------------\nRunning Script: %s. Execution Time: %f\n------------\n\n", action.ScriptName, action_exec_time)
|
||||
}
|
||||
|
||||
// save results
|
||||
payload.Stdout += stdout
|
||||
payload.Stderr += stderr
|
||||
payload.RetCode = retcode
|
||||
|
||||
if !data.ContinueOnError && stderr != "" {
|
||||
break
|
||||
}
|
||||
|
||||
} else if action.ActionType == "cmd" {
|
||||
// out[0] == stdout, out[1] == stderr
|
||||
out, err := CMDShell(action.Shell, []string{}, action.Command, action.Timeout, false, action.RunAsUser)
|
||||
|
||||
if err != nil {
|
||||
a.Logger.Debugln(err)
|
||||
}
|
||||
|
||||
if len(data.TaskActions) > 1 {
|
||||
action_exec_time := time.Since(action_start).Seconds()
|
||||
|
||||
// add text to stdout showing which script ran
|
||||
payload.Stdout += fmt.Sprintf("\n------------\nRunning Command: %s. Execution Time: %f\n------------\n\n", action.Command, action_exec_time)
|
||||
}
|
||||
// save results
|
||||
payload.Stdout += out[0]
|
||||
payload.Stderr += out[1]
|
||||
|
||||
// no error
|
||||
if out[1] == "" {
|
||||
payload.RetCode = 0
|
||||
} else {
|
||||
payload.RetCode = 1
|
||||
|
||||
if !data.ContinueOnError {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
a.Logger.Debugln("Invalid Action", action)
|
||||
}
|
||||
}
|
||||
|
||||
payload.ExecTime = time.Since(start).Seconds()
|
||||
|
||||
_, perr := a.rClient.R().SetBody(payload).Patch(url)
|
||||
if perr != nil {
|
||||
a.Logger.Debugln(perr)
|
||||
return perr
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SchedTask struct {
|
||||
PK int `json:"pk"`
|
||||
Type string `json:"type"`
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="TacticalRMM"
|
||||
version="2.7.0.0"
|
||||
version="2.8.0.0"
|
||||
processorArchitecture="*"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define MyAppName "Tactical RMM Agent"
|
||||
#define MyAppVersion "2.7.0"
|
||||
#define MyAppVersion "2.8.0"
|
||||
#define MyAppPublisher "AmidaWare Inc"
|
||||
#define MyAppURL "https://github.com/amidaware"
|
||||
#define MyAppExeName "tacticalrmm.exe"
|
||||
|
||||
20
go.mod
20
go.mod
@@ -7,31 +7,31 @@ require (
|
||||
github.com/elastic/go-sysinfo v1.11.2
|
||||
github.com/go-ole/go-ole v1.3.0
|
||||
github.com/go-ping/ping v1.1.0
|
||||
github.com/go-resty/resty/v2 v2.11.0
|
||||
github.com/go-resty/resty/v2 v2.13.1
|
||||
github.com/gonutz/w32/v2 v2.11.1
|
||||
github.com/iamacarpet/go-win64api v0.0.0-20230324134531-ef6dbdd6db97
|
||||
github.com/nats-io/nats.go v1.34.0
|
||||
github.com/nats-io/nats.go v1.36.0
|
||||
github.com/rickb777/date v1.19.1
|
||||
github.com/shirou/gopsutil/v3 v3.23.12
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/ugorji/go/codec v1.2.12
|
||||
github.com/wh1te909/go-win64api v0.0.0-20230802051600-21b24f62e846
|
||||
github.com/wh1te909/trmm-shared v0.0.0-20220227075846-f9f757361139
|
||||
golang.org/x/net v0.19.0 // indirect
|
||||
golang.org/x/sys v0.16.0
|
||||
golang.org/x/net v0.25.0 // indirect
|
||||
golang.org/x/sys v0.20.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/amidaware/taskmaster v0.0.0-20220111015025-c9cd178bbbf2
|
||||
github.com/go-cmd/cmd v1.4.2
|
||||
github.com/go-cmd/cmd v1.4.3
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/fourcorelabs/wintoken v1.0.0
|
||||
github.com/jaypipes/ghw v0.12.0
|
||||
github.com/kardianos/service v1.2.2
|
||||
github.com/spf13/viper v1.18.2
|
||||
golang.org/x/text v0.14.0
|
||||
github.com/spf13/viper v1.19.0
|
||||
golang.org/x/text v0.15.0
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -52,7 +52,7 @@ require (
|
||||
github.com/nats-io/nkeys v0.4.7 // indirect
|
||||
github.com/nats-io/nuid v1.0.1 // indirect
|
||||
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
@@ -71,9 +71,9 @@ require (
|
||||
github.com/yusufpapurcu/wmi v1.2.3 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/multierr v1.9.0 // indirect
|
||||
golang.org/x/crypto v0.18.0 // indirect
|
||||
golang.org/x/crypto v0.23.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
|
||||
golang.org/x/sync v0.5.0 // indirect
|
||||
golang.org/x/sync v0.6.0 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2 // indirect
|
||||
|
||||
55
go.sum
55
go.sum
@@ -28,8 +28,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos
|
||||
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-cmd/cmd v1.4.2 h1:pnX38iIJHh4huzBSqfkAZkfXrVwM/5EccAJmrVqMnbg=
|
||||
github.com/go-cmd/cmd v1.4.2/go.mod h1:u3hxg/ry+D5kwh8WvUkHLAMe2zQCaXd00t35WfQaOFk=
|
||||
github.com/go-cmd/cmd v1.4.3 h1:6y3G+3UqPerXvPcXvj+5QNPHT02BUw7p6PsqRxLNA7Y=
|
||||
github.com/go-cmd/cmd v1.4.3/go.mod h1:u3hxg/ry+D5kwh8WvUkHLAMe2zQCaXd00t35WfQaOFk=
|
||||
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
|
||||
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
@@ -37,8 +37,8 @@ github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
||||
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
|
||||
github.com/go-ping/ping v1.1.0 h1:3MCGhVX4fyEUuhsfwPrsEdQw6xspHkv5zHsiSoDFZYw=
|
||||
github.com/go-ping/ping v1.1.0/go.mod h1:xIFjORFzTxqIV/tDVGO4eDy/bLuSyawEeojSm3GfRGk=
|
||||
github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8=
|
||||
github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A=
|
||||
github.com/go-resty/resty/v2 v2.13.1 h1:x+LHXBI2nMB1vqndymf26quycC4aggYJ7DECYbiz03g=
|
||||
github.com/go-resty/resty/v2 v2.13.1/go.mod h1:GznXlLxkq6Nh4sU59rPmUw3VtgpO3aS96ORAI6Q7d+0=
|
||||
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
|
||||
github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
@@ -109,8 +109,8 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/nats-io/nats.go v1.34.0 h1:fnxnPCNiwIG5w08rlMcEKTUw4AV/nKyGCOJE8TdhSPk=
|
||||
github.com/nats-io/nats.go v1.34.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
|
||||
github.com/nats-io/nats.go v1.36.0 h1:suEUPuWzTSse/XhESwqLxXGuj8vGRuPRoG7MoRN/qyU=
|
||||
github.com/nats-io/nats.go v1.36.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
|
||||
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
|
||||
github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=
|
||||
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
||||
@@ -125,8 +125,8 @@ github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y
|
||||
github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
|
||||
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
|
||||
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
@@ -167,17 +167,19 @@ github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
|
||||
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ=
|
||||
github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk=
|
||||
github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
|
||||
github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
|
||||
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
|
||||
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
|
||||
@@ -200,9 +202,9 @@ go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTV
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
|
||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
|
||||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
@@ -219,16 +221,16 @@ golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qx
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
|
||||
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
|
||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
|
||||
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -257,26 +259,27 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
|
||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
|
||||
2
main.go
2
main.go
@@ -25,7 +25,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
version = "2.7.0"
|
||||
version = "2.8.0"
|
||||
log = logrus.New()
|
||||
logFile *os.File
|
||||
)
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
"FixedFileInfo": {
|
||||
"FileVersion": {
|
||||
"Major": 2,
|
||||
"Minor": 7,
|
||||
"Minor": 8,
|
||||
"Patch": 0,
|
||||
"Build": 0
|
||||
},
|
||||
"ProductVersion": {
|
||||
"Major": 2,
|
||||
"Minor": 7,
|
||||
"Minor": 8,
|
||||
"Patch": 0,
|
||||
"Build": 0
|
||||
},
|
||||
@@ -22,14 +22,14 @@
|
||||
"Comments": "",
|
||||
"CompanyName": "AmidaWare Inc",
|
||||
"FileDescription": "Tactical RMM Agent",
|
||||
"FileVersion": "v2.7.0.0",
|
||||
"FileVersion": "v2.8.0.0",
|
||||
"InternalName": "tacticalrmm.exe",
|
||||
"LegalCopyright": "Copyright (c) 2024 AmidaWare Inc",
|
||||
"LegalTrademarks": "",
|
||||
"OriginalFilename": "tacticalrmm.exe",
|
||||
"PrivateBuild": "",
|
||||
"ProductName": "Tactical RMM Agent",
|
||||
"ProductVersion": "v2.7.0.0",
|
||||
"ProductVersion": "v2.8.0.0",
|
||||
"SpecialBuild": ""
|
||||
},
|
||||
"VarFileInfo": {
|
||||
|
||||
Reference in New Issue
Block a user