12 Commits

Author SHA1 Message Date
wh1te909
f336315312 Release 2.4.1 2022-10-25 14:50:06 -07:00
wh1te909
935d5d8ab8 bump version 2022-10-25 14:47:42 -07:00
wh1te909
552d63ea6e update mesh installpath 2022-10-25 11:34:44 -07:00
wh1te909
16df03678c update reqs 2022-10-24 19:33:38 -07:00
wh1te909
56d2356db2 update reqs 2022-10-19 12:37:47 -07:00
wh1te909
d7560b0706 Release 2.4.0 2022-09-23 19:17:27 -07:00
wh1te909
43d13a78f2 bump version 2022-09-23 19:16:43 -07:00
wh1te909
cd93ec12fa update reqs 2022-09-23 23:30:23 +00:00
wh1te909
852dfee29f mac agent 2022-09-23 16:05:17 -07:00
wh1te909
e0cfb7c90e remove defender exclusions 2022-09-15 18:37:07 -07:00
Dan
89be0e7d99 Merge pull request #19 from redanthrax/MacAgent
added mesh location to agent
2022-09-15 18:28:52 -07:00
redanthrax
b21929d044 added mesh location to agent 2022-08-23 13:55:25 -07:00
12 changed files with 208 additions and 90 deletions

View File

@@ -72,10 +72,18 @@ type Agent struct {
}
const (
progFilesName = "TacticalAgent"
winExeName = "tacticalrmm.exe"
winSvcName = "tacticalrmm"
meshSvcName = "mesh agent"
progFilesName = "TacticalAgent"
winExeName = "tacticalrmm.exe"
winSvcName = "tacticalrmm"
meshSvcName = "mesh agent"
etcConfig = "/etc/tacticalagent"
nixAgentDir = "/opt/tacticalagent"
nixMeshDir = "/opt/tacticalmesh"
nixAgentBin = nixAgentDir + "/tacticalagent"
nixMeshAgentBin = nixMeshDir + "/meshagent"
macPlistPath = "/Library/LaunchDaemons/tacticalagent.plist"
macPlistName = "tacticalagent"
defaultMacMeshSvcDir = "/usr/local/mesh_services"
)
var winTempDir = filepath.Join(os.Getenv("PROGRAMDATA"), "TacticalRMM")
@@ -120,14 +128,21 @@ func New(logger *logrus.Logger, version string) *Agent {
}
var MeshSysExe string
if len(ac.CustomMeshDir) > 0 {
MeshSysExe = filepath.Join(ac.CustomMeshDir, "MeshAgent.exe")
} else {
MeshSysExe = filepath.Join(os.Getenv("ProgramFiles"), "Mesh Agent", "MeshAgent.exe")
}
if runtime.GOOS == "linux" {
MeshSysExe = "/opt/tacticalmesh/meshagent"
switch runtime.GOOS {
case "windows":
if len(ac.CustomMeshDir) > 0 {
MeshSysExe = filepath.Join(ac.CustomMeshDir, "MeshAgent.exe")
} else {
MeshSysExe = filepath.Join(os.Getenv("ProgramFiles"), "Mesh Agent", "MeshAgent.exe")
}
case "darwin":
if trmm.FileExists(nixMeshAgentBin) {
MeshSysExe = nixMeshAgentBin
} else {
MeshSysExe = "/usr/local/mesh_services/meshagent/meshagent"
}
default:
MeshSysExe = nixMeshAgentBin
}
svcConf := &service.Config{

View File

@@ -50,7 +50,7 @@ func (a *Agent) GetDisks() []trmm.Disk {
}
for _, p := range partitions {
if strings.Contains(p.Device, "dev/loop") {
if strings.Contains(p.Device, "dev/loop") || strings.Contains(p.Device, "devfs") {
continue
}
usage, err := disk.Usage(p.Mountpoint)
@@ -283,7 +283,7 @@ func (a *Agent) AgentUpdate(url, inno, version string) {
}
}
if a.seEnforcing() {
if runtime.GOOS == "linux" && a.seEnforcing() {
se := a.NewCMDOpts()
se.Command = fmt.Sprintf("restorecon -rv %s", self)
out := a.CmdV2(se)
@@ -292,7 +292,15 @@ func (a *Agent) AgentUpdate(url, inno, version string) {
opts := a.NewCMDOpts()
opts.Detached = true
opts.Command = "systemctl restart tacticalagent.service"
switch runtime.GOOS {
case "linux":
opts.Command = "systemctl restart tacticalagent.service"
case "darwin":
opts.Command = "launchctl kickstart -k system/tacticalagent"
default:
return
}
a.CmdV2(opts)
}
@@ -310,7 +318,9 @@ func (a *Agent) AgentUninstall(code string) {
opts := a.NewCMDOpts()
opts.IsScript = true
opts.Shell = f.Name()
opts.Args = []string{"uninstall"}
if runtime.GOOS == "linux" {
opts.Args = []string{"uninstall"}
}
opts.Detached = true
a.CmdV2(opts)
}
@@ -354,7 +364,15 @@ func (a *Agent) getMeshNodeID() (string, error) {
func (a *Agent) RecoverMesh() {
a.Logger.Infoln("Attempting mesh recovery")
opts := a.NewCMDOpts()
opts.Command = "systemctl restart meshagent.service"
def := "systemctl restart meshagent.service"
switch runtime.GOOS {
case "linux":
opts.Command = def
case "darwin":
opts.Command = "launchctl kickstart -k system/meshagent"
default:
opts.Command = def
}
a.CmdV2(opts)
a.SyncMeshNodeID()
}
@@ -413,18 +431,25 @@ func (a *Agent) GetWMIInfo() map[string]interface{} {
wmiInfo["make_model"] = ""
chassis, err := ghw.Chassis(ghw.WithDisableWarnings())
if err != nil {
a.Logger.Errorln("ghw.Chassis()", err)
a.Logger.Debugln("ghw.Chassis()", err)
} else {
if chassis.Vendor != "" || chassis.Version != "" {
wmiInfo["make_model"] = fmt.Sprintf("%s %s", chassis.Vendor, chassis.Version)
}
}
if runtime.GOOS == "darwin" {
opts := a.NewCMDOpts()
opts.Command = "sysctl hw.model"
out := a.CmdV2(opts)
wmiInfo["make_model"] = strings.ReplaceAll(out.Stdout, "hw.model: ", "")
}
// gfx cards
gpu, err := ghw.GPU(ghw.WithDisableWarnings())
if err != nil {
a.Logger.Errorln("ghw.GPU()", err)
a.Logger.Debugln("ghw.GPU()", err)
} else {
for _, i := range gpu.GraphicsCards {
if i.DeviceInfo != nil {

View File

@@ -653,18 +653,6 @@ func (a *Agent) AgentUninstall(code string) {
cmd.Start()
}
func (a *Agent) addDefenderExlusions() {
code := fmt.Sprintf(`
Add-MpPreference -ExclusionPath '%s\*'
Add-MpPreference -ExclusionPath '%s\*'
Add-MpPreference -ExclusionPath '%s\*'
`, winTempDir, a.ProgramDir, winMeshDir)
_, _, _, err := a.RunScript(code, "powershell", []string{}, 20, false)
if err != nil {
a.Logger.Debugln(err)
}
}
// RunMigrations cleans up unused stuff from older agents
func (a *Agent) RunMigrations() {
for _, i := range []string{"nssm.exe", "nssm-x86.exe"} {

View File

@@ -140,34 +140,57 @@ func (a *Agent) Install(i *Installer) {
installerMeshSystemEXE = a.MeshSystemEXE
}
var meshNodeID string
var meshNodeID, meshOutput string
if runtime.GOOS == "windows" && !i.NoMesh {
mesh := filepath.Join(a.ProgramDir, a.MeshInstaller)
if i.LocalMesh == "" {
if !i.NoMesh && runtime.GOOS != "linux" {
switch runtime.GOOS {
case "windows":
meshOutput = filepath.Join(a.ProgramDir, a.MeshInstaller)
case "darwin":
tmp, err := createTmpFile()
if err != nil {
a.Logger.Fatalln("Failed to create mesh temp file", err)
}
meshOutput = tmp.Name()
os.Chmod(meshOutput, 0755)
defer os.Remove(meshOutput)
defer os.Remove(meshOutput + ".msh")
}
if runtime.GOOS == "windows" && i.LocalMesh != "" {
err := copyFile(i.LocalMesh, meshOutput)
if err != nil {
a.installerMsg(err.Error(), "error", i.Silent)
}
} else {
a.Logger.Infoln("Downloading mesh agent...")
payload := map[string]string{"goarch": a.GoArch, "plat": a.Platform}
r, err := rClient.R().SetBody(payload).SetOutput(mesh).Post(fmt.Sprintf("%s/api/v3/meshexe/", baseURL))
r, err := rClient.R().SetBody(payload).SetOutput(meshOutput).Post(fmt.Sprintf("%s/api/v3/meshexe/", baseURL))
if err != nil {
a.installerMsg(fmt.Sprintf("Failed to download mesh agent: %s", err.Error()), "error", i.Silent)
}
if r.StatusCode() != 200 {
a.installerMsg(fmt.Sprintf("Unable to download the mesh agent from the RMM. %s", r.String()), "error", i.Silent)
}
} else {
err := copyFile(i.LocalMesh, mesh)
if err != nil {
a.installerMsg(err.Error(), "error", i.Silent)
}
}
a.Logger.Infoln("Installing mesh agent...")
a.Logger.Debugln("Mesh agent:", mesh)
a.Logger.Debugln("Mesh agent:", meshOutput)
time.Sleep(1 * time.Second)
meshNodeID, err = a.installMesh(mesh, installerMeshSystemEXE, i.Proxy)
if err != nil {
a.installerMsg(fmt.Sprintf("Failed to install mesh agent: %s", err.Error()), "error", i.Silent)
if runtime.GOOS == "windows" {
meshNodeID, err = a.installMesh(meshOutput, installerMeshSystemEXE, i.Proxy)
if err != nil {
a.installerMsg(fmt.Sprintf("Failed to install mesh agent: %s", err.Error()), "error", i.Silent)
}
} else {
opts := a.NewCMDOpts()
opts.Command = fmt.Sprintf("%s -install --installPath=%s", meshOutput, nixMeshDir)
out := a.CmdV2(opts)
if out.Status.Exit != 0 {
a.Logger.Fatalln("Error installing mesh agent:", out.Stderr)
}
fmt.Println(out.Stdout)
}
}
@@ -219,6 +242,47 @@ func (a *Agent) Install(i *Installer) {
// check in once
a.DoNatsCheckIn()
if runtime.GOOS == "darwin" {
os.MkdirAll(nixAgentDir, 0755)
self, _ := os.Executable()
copyFile(self, nixAgentBin)
os.Chmod(nixAgentBin, 0755)
svc := fmt.Sprintf(`
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>%s</string>
<key>ServiceDescription</key>
<string>TacticalAgent Service</string>
<key>ProgramArguments</key>
<array>
<string>%s</string>
<string>-m</string>
<string>svc</string>
</array>
<key>WorkingDirectory</key>
<string>%s/</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
`, macPlistName, nixAgentBin, nixAgentDir)
os.WriteFile(macPlistPath, []byte(svc), 0644)
opts := a.NewCMDOpts()
opts.Command = fmt.Sprintf("launchctl bootstrap system %s", macPlistPath)
a.CmdV2(opts)
}
if runtime.GOOS == "windows" {
// send software api
a.SendSoftware()
@@ -245,9 +309,6 @@ func (a *Agent) Install(i *Installer) {
a.installerMsg(out.ErrorMsg, "error", i.Silent)
}
a.Logger.Infoln("Adding windows defender exclusions")
a.addDefenderExlusions()
if i.Power {
a.Logger.Infoln("Disabling sleep/hibernate...")
DisableSleepHibernate()

View File

@@ -15,17 +15,16 @@ https://license.tacticalrmm.com
package agent
import (
"fmt"
"log"
"os"
"runtime"
"time"
"github.com/spf13/viper"
trmm "github.com/wh1te909/trmm-shared"
)
const (
etcConfig = "/etc/tacticalagent"
)
func (a *Agent) checkExistingAndRemove(silent bool) {}
func (a *Agent) installerMsg(msg, alert string, silent bool) {
if alert == "error" {
a.Logger.Fatalln(msg)
@@ -51,7 +50,31 @@ func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, me
}
}
func (a *Agent) addDefenderExlusions() {}
func (a *Agent) checkExistingAndRemove(silent bool) {
if runtime.GOOS == "darwin" {
if trmm.FileExists(a.MeshSystemEXE) {
a.Logger.Infoln("Existing meshagent found, attempting to remove...")
uopts := a.NewCMDOpts()
uopts.Command = fmt.Sprintf("%s -fulluninstall", a.MeshSystemEXE)
uout := a.CmdV2(uopts)
fmt.Println(uout.Stdout)
time.Sleep(1 * time.Second)
}
if trmm.FileExists(macPlistPath) {
a.Logger.Infoln("Existing tacticalagent plist found, attempting to remove...")
opts := a.NewCMDOpts()
opts.Command = fmt.Sprintf("launchctl bootout system %s", macPlistPath)
a.CmdV2(opts)
}
os.RemoveAll(defaultMacMeshSvcDir)
os.RemoveAll(nixMeshDir)
os.Remove(etcConfig)
os.RemoveAll(nixAgentDir)
os.Remove(macPlistPath)
}
}
func DisableSleepHibernate() {}

View File

@@ -12,6 +12,7 @@ https://license.tacticalrmm.com
package agent
import (
"runtime"
"sync"
"time"
@@ -27,11 +28,13 @@ func (a *Agent) RunAsService() {
}
func (a *Agent) AgentSvc() {
go a.GetPython(false)
if runtime.GOOS == "windows" {
go a.GetPython(false)
err := createWinTempDir()
if err != nil {
a.Logger.Errorln("AgentSvc() createWinTempDir():", err)
err := createWinTempDir()
if err != nil {
a.Logger.Errorln("AgentSvc() createWinTempDir():", err)
}
}
a.RunMigrations()
@@ -53,8 +56,10 @@ func (a *Agent) AgentSvc() {
go a.SyncMeshNodeID()
time.Sleep(time.Duration(randRange(1, 3)) * time.Second)
a.AgentStartup()
a.SendSoftware()
if runtime.GOOS == "windows" {
a.AgentStartup()
a.SendSoftware()
}
checkInHelloTicker := time.NewTicker(time.Duration(randRange(30, 60)) * time.Second)
checkInAgentInfoTicker := time.NewTicker(time.Duration(randRange(200, 400)) * time.Second)

View File

@@ -3,7 +3,7 @@
<assemblyIdentity
type="win32"
name="TacticalRMM"
version="2.3.1.0"
version="2.4.1.0"
processorArchitecture="*"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>

View File

@@ -1,5 +1,5 @@
#define MyAppName "Tactical RMM Agent"
#define MyAppVersion "2.3.1"
#define MyAppVersion "2.4.1"
#define MyAppPublisher "AmidaWare LLC"
#define MyAppURL "https://github.com/amidaware"
#define MyAppExeName "tacticalrmm.exe"

12
go.mod
View File

@@ -10,16 +10,16 @@ require (
github.com/go-resty/resty/v2 v2.7.0
github.com/gonutz/w32/v2 v2.4.0
github.com/iamacarpet/go-win64api v0.0.0-20220531131246-e84054eb584d
github.com/nats-io/nats-server/v2 v2.9.0 // indirect
github.com/nats-io/nats.go v1.16.1-0.20220906180156-a1017eec10b0
github.com/nats-io/nats-server/v2 v2.9.3 // indirect
github.com/nats-io/nats.go v1.18.0
github.com/rickb777/date v1.19.1
github.com/shirou/gopsutil/v3 v3.22.8
github.com/shirou/gopsutil/v3 v3.22.9
github.com/sirupsen/logrus v1.9.0
github.com/ugorji/go/codec v1.2.7
github.com/wh1te909/go-win64api v0.0.0-20210906074314-ab23795a6ae5
github.com/wh1te909/trmm-shared v0.0.0-20220227075846-f9f757361139
golang.org/x/net v0.0.0-20220706163947-c90051bbdb60 // indirect
golang.org/x/sys v0.0.0-20220906135438-9e1f76180b77
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec
)
require (
@@ -30,7 +30,7 @@ require (
require (
github.com/fourcorelabs/wintoken v1.0.0
github.com/jaypipes/ghw v0.9.0
github.com/kardianos/service v1.2.1
github.com/kardianos/service v1.2.2
github.com/spf13/viper v1.13.0
)
@@ -67,7 +67,7 @@ require (
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.5.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be // indirect
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect

31
go.sum
View File

@@ -140,8 +140,9 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/logger v1.1.0/go.mod h1:w7O8nrRr0xufejBlQMI83MXqRusvREoJdaAxV+CoAB4=
github.com/google/logger v1.1.1/go.mod h1:BkeJZ+1FhQ+/d087r4dzojEg1u2ZX+ZqG1jTUrLM+zQ=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
@@ -188,10 +189,10 @@ github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/kardianos/service v1.2.1 h1:AYndMsehS+ywIS6RB9KOlcXzteWUzxgMgBymJD7+BYk=
github.com/kardianos/service v1.2.1/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM=
github.com/kardianos/service v1.2.2 h1:ZvePhAHfvo0A7Mftk/tEzqEZ7Q4lgnR8sGz4xu1YX60=
github.com/kardianos/service v1.2.2/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
@@ -211,10 +212,10 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
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/jwt/v2 v2.3.0 h1:z2mA1a7tIf5ShggOFlR1oBPgd6hGqcDYsISxZByUzdI=
github.com/nats-io/nats-server/v2 v2.9.0 h1:DLWu+7/VgGOoChcDKytnUZPAmudpv7o/MhKmNrnH1RE=
github.com/nats-io/nats-server/v2 v2.9.0/go.mod h1:BWKY6217RvhI+FDoOLZ2BH+hOC37xeKRBlQ1Lz7teKI=
github.com/nats-io/nats.go v1.16.1-0.20220906180156-a1017eec10b0 h1:dPUKD6Iv8M1y9MU8PK6H4a4/12yx5/CbaYWz/Z1arY8=
github.com/nats-io/nats.go v1.16.1-0.20220906180156-a1017eec10b0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w=
github.com/nats-io/nats-server/v2 v2.9.3 h1:HrfzA7G9LNetKkm1z+jU/e9kuAe+E6uaBuuq9EB5sQQ=
github.com/nats-io/nats-server/v2 v2.9.3/go.mod h1:4sq8wvrpbvSzL1n3ZfEYnH4qeUuIl5W990j3kw13rRk=
github.com/nats-io/nats.go v1.18.0 h1:o480Ao6kuSSFyJO75rGTXCEPj7LGkY84C1Ye+Uhm4c0=
github.com/nats-io/nats.go v1.18.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w=
github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8=
github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
@@ -256,8 +257,8 @@ github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XF
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
github.com/scjalliance/comshim v0.0.0-20190308082608-cf06d2532c4e h1:+/AzLkOdIXEPrAQtwAeWOBnPQ0BnYlBW0aCZmSb47u4=
github.com/scjalliance/comshim v0.0.0-20190308082608-cf06d2532c4e/go.mod h1:9Tc1SKnfACJb9N7cw2eyuI6xzy845G7uZONBsi5uPEA=
github.com/shirou/gopsutil/v3 v3.22.8 h1:a4s3hXogo5mE2PfdfJIonDbstO/P+9JszdfhAHSzD9Y=
github.com/shirou/gopsutil/v3 v3.22.8/go.mod h1:s648gW4IywYzUfE/KjXxUsqrqx/T2xO5VqOXxONeRfI=
github.com/shirou/gopsutil/v3 v3.22.9 h1:yibtJhIVEMcdw+tCTbOPiF1VcsuDeTE4utJ8Dm4c5eA=
github.com/shirou/gopsutil/v3 v3.22.9/go.mod h1:bBYl1kjgEJpWpxeHmLI+dVHWtyAwfcmSBLDsp2TNT8A=
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
@@ -316,8 +317,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM=
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be h1:fmw3UbQh+nxngCAHrDCCztao/kbYFnWjoqop8dHx05A=
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -468,8 +469,8 @@ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220906135438-9e1f76180b77 h1:C1tElbkWrsSkn3IRl1GCW/gETw1TywWIPgwZtXTZbYg=
golang.org/x/sys v0.0.0-20220906135438-9e1f76180b77/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI=
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -483,7 +484,7 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ=
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=

View File

@@ -25,7 +25,7 @@ import (
)
var (
version = "2.3.1"
version = "2.4.1"
log = logrus.New()
logFile *os.File
)
@@ -185,7 +185,7 @@ func setupLogging(level, to *string) {
switch runtime.GOOS {
case "windows":
logFile, _ = os.OpenFile(filepath.Join(os.Getenv("ProgramFiles"), "TacticalAgent", "agent.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0664)
case "linux":
default:
logFile, _ = os.OpenFile(filepath.Join("/var/log/", "tacticalagent.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0664)
}
log.SetOutput(logFile)

View File

@@ -2,13 +2,13 @@
"FixedFileInfo": {
"FileVersion": {
"Major": 2,
"Minor": 3,
"Minor": 4,
"Patch": 1,
"Build": 0
},
"ProductVersion": {
"Major": 2,
"Minor": 3,
"Minor": 4,
"Patch": 1,
"Build": 0
},
@@ -22,14 +22,14 @@
"Comments": "",
"CompanyName": "AmidaWare LLC",
"FileDescription": "Tactical RMM Agent",
"FileVersion": "v2.3.1.0",
"FileVersion": "v2.4.1.0",
"InternalName": "tacticalrmm.exe",
"LegalCopyright": "Copyright (c) 2022 AmidaWare LLC",
"LegalTrademarks": "",
"OriginalFilename": "tacticalrmm.exe",
"PrivateBuild": "",
"ProductName": "Tactical RMM Agent",
"ProductVersion": "v2.3.1.0",
"ProductVersion": "v2.4.1.0",
"SpecialBuild": ""
},
"VarFileInfo": {