diff --git a/LICENSE.md b/LICENSE.md index 530804b..8783c2a 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,11 +1,11 @@ ### Tactical RMM License Version 1.0 -Text of license:   Copyright © 2022 AmidaWare LLC. All rights reserved.
+Text of license:   Copyright © 2023 AmidaWare Inc. All rights reserved.
          Amending the text of this license is not permitted. -Trade Mark:    "Tactical RMM" is a trade mark of AmidaWare LLC. +Trade Mark:    "Tactical RMM" is a trade mark of AmidaWare Inc. -Licensor:       AmidaWare LLC of 1968 S Coast Hwy PMB 3847 Laguna Beach, CA, USA. +Licensor:       AmidaWare Inc. of 1968 S Coast Hwy PMB 3847 Laguna Beach, CA, USA. Licensed Software:  The software known as Tactical RMM Version v0.12.0 (and all subsequent releases and versions) and the Tactical RMM Agent v2.0.0 (and all subsequent releases and versions). @@ -26,7 +26,7 @@ This license does not allow the functionality of the Licensed Software (whether * the offering of installation and/or configuration services; * the offer for sale, distribution or sale of any service or product (whether or not branded as Tactical RMM). -The prior written approval of AmidaWare LLC must be obtained for all commercial use and/or for-profit service use of the (i) Licensed Software (whether in whole or in part), (ii) a modified version of the Licensed Software and/or (iii) a derivative work. +The prior written approval of AmidaWare Inc. must be obtained for all commercial use and/or for-profit service use of the (i) Licensed Software (whether in whole or in part), (ii) a modified version of the Licensed Software and/or (iii) a derivative work. The terms of this license apply to all copies of the Licensed Software (including modified versions) and derivative works. @@ -38,7 +38,7 @@ If a derivative work is created which is based on or otherwise incorporates all ### 4. Copyright Notice The following copyright notice shall be included in all copies of the Licensed Software: -   Copyright © 2022 AmidaWare LLC. +   Copyright © 2023 AmidaWare Inc.    Licensed under the Tactical RMM License Version 1.0 (the “License”).
   You may only use the Licensed Software in accordance with the License.
@@ -54,13 +54,13 @@ THE FOLLOWING EXCLUSIONS SHALL APPLY TO THE FULLEST EXTENT PERMISSIBLE AT LAW. This license shall terminate with immediate effect if there is a material breach of any of its terms. ### 8. No partnership, agency or joint venture -Nothing in this license agreement is intended to, or shall be deemed to, establish any partnership or joint venture or any relationship of agency between AmidaWare LLC and any other person. +Nothing in this license agreement is intended to, or shall be deemed to, establish any partnership or joint venture or any relationship of agency between AmidaWare Inc. and any other person. ### 9. No endorsement The names of the authors and/or the copyright holders must not be used to promote or endorse any products or services which are in any way derived from the Licensed Software without prior written consent. ### 10. Trademarks -No permission is granted to use the trademark “Tactical RMM” or any other trade name, trademark, service mark or product name of AmidaWare LLC except to the extent necessary to comply with the notice requirements in Section 4 (Copyright Notice). +No permission is granted to use the trademark “Tactical RMM” or any other trade name, trademark, service mark or product name of AmidaWare Inc. except to the extent necessary to comply with the notice requirements in Section 4 (Copyright Notice). ### 11. Entire agreement This license contains the whole agreement relating to its subject matter. diff --git a/agent/agent.go b/agent/agent.go index 2f94140..1cc74cf 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. @@ -14,6 +14,7 @@ package agent import ( "bytes" "context" + "crypto/tls" "errors" "fmt" "math" @@ -73,6 +74,7 @@ type Agent struct { NatsProxyPort string NatsPingInterval int NatsWSCompression bool + Insecure bool } const ( @@ -125,12 +127,20 @@ func New(logger *logrus.Logger, version string) *Agent { headers["Authorization"] = fmt.Sprintf("Token %s", ac.Token) } + insecure := ac.Insecure == "true" + restyC := resty.New() restyC.SetBaseURL(ac.BaseURL) restyC.SetCloseConnection(true) restyC.SetHeaders(headers) restyC.SetTimeout(15 * time.Second) restyC.SetDebug(logger.IsLevelEnabled(logrus.DebugLevel)) + if insecure { + insecureConf := &tls.Config{ + InsecureSkipVerify: true, + } + restyC.SetTLSClientConfig(insecureConf) + } if len(ac.Proxy) > 0 { restyC.SetProxy(ac.Proxy) @@ -236,6 +246,7 @@ func New(logger *logrus.Logger, version string) *Agent { NatsProxyPort: natsProxyPort, NatsPingInterval: natsPingInterval, NatsWSCompression: natsWsCompression, + Insecure: insecure, } } @@ -477,6 +488,12 @@ func (a *Agent) setupNatsOptions() []nats.Option { a.Logger.Errorln("NATS error:", err) a.Logger.Errorf("%+v\n", sub) })) + if a.Insecure { + insecureConf := &tls.Config{ + InsecureSkipVerify: true, + } + opts = append(opts, nats.Secure(insecureConf)) + } return opts } diff --git a/agent/agent_unix.go b/agent/agent_unix.go index bcd0e02..80d81c1 100644 --- a/agent/agent_unix.go +++ b/agent/agent_unix.go @@ -2,7 +2,7 @@ // +build !windows /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. @@ -16,6 +16,7 @@ package agent import ( "bufio" + "crypto/tls" "errors" "fmt" "os" @@ -160,6 +161,7 @@ func NewAgentConfig() *rmm.AgentConfig { NatsProxyPort: viper.GetString("natsproxyport"), NatsStandardPort: viper.GetString("natsstandardport"), NatsPingInterval: viper.GetInt("natspinginterval"), + Insecure: viper.GetString("insecure"), } return ret } @@ -248,6 +250,12 @@ func (a *Agent) AgentUpdate(url, inno, version string) error { if len(a.Proxy) > 0 { rClient.SetProxy(a.Proxy) } + if a.Insecure { + insecureConf := &tls.Config{ + InsecureSkipVerify: true, + } + rClient.SetTLSClientConfig(insecureConf) + } r, err := rClient.R().SetOutput(f.Name()).Get(url) if err != nil { diff --git a/agent/agent_windows.go b/agent/agent_windows.go index ebdce00..140c403 100644 --- a/agent/agent_windows.go +++ b/agent/agent_windows.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. @@ -14,6 +14,7 @@ package agent import ( "bytes" "context" + "crypto/tls" "errors" "fmt" "os" @@ -68,6 +69,7 @@ func NewAgentConfig() *rmm.AgentConfig { natsStandardPort, _, _ := k.GetStringValue("NatsStandardPort") natsPingInterval, _, _ := k.GetStringValue("NatsPingInterval") npi, _ := strconv.Atoi(natsPingInterval) + insecure, _, _ := k.GetStringValue("Insecure") return &rmm.AgentConfig{ BaseURL: baseurl, @@ -85,6 +87,7 @@ func NewAgentConfig() *rmm.AgentConfig { NatsProxyPort: natsProxyPort, NatsStandardPort: natsStandardPort, NatsPingInterval: npi, + Insecure: insecure, } } @@ -158,21 +161,36 @@ func (a *Agent) RunScript(code string, shell string, args []string, timeout int, defer cancel() var timedOut = false + var token *wintoken.Token + var envBlock *uint16 + usingEnvVars := len(envVars) > 0 cmd := exec.Command(exe, cmdArgs...) if runasuser { - token, err := wintoken.GetInteractiveToken(wintoken.TokenImpersonation) + token, err = wintoken.GetInteractiveToken(wintoken.TokenImpersonation) if err == nil { defer token.Close() cmd.SysProcAttr = &syscall.SysProcAttr{Token: syscall.Token(token.Token()), HideWindow: true} + + if usingEnvVars { + envBlock, err = CreateEnvironmentBlock(syscall.Token(token.Token())) + if err == nil { + defer DestroyEnvironmentBlock(envBlock) + userEnv := EnvironmentBlockToSlice(envBlock) + cmd.Env = userEnv + } else { + cmd.Env = os.Environ() + } + } } + } else if usingEnvVars { + cmd.Env = os.Environ() } - cmd.Stdout = &outb - cmd.Stderr = &errb - if len(envVars) > 0 { - cmd.Env = os.Environ() + if usingEnvVars { cmd.Env = append(cmd.Env, envVars...) } + cmd.Stdout = &outb + cmd.Stderr = &errb if cmdErr := cmd.Start(); cmdErr != nil { a.Logger.Debugln(cmdErr) @@ -615,6 +633,12 @@ func (a *Agent) AgentUpdate(url, inno, version string) error { if len(a.Proxy) > 0 { rClient.SetProxy(a.Proxy) } + if a.Insecure { + insecureConf := &tls.Config{ + InsecureSkipVerify: true, + } + rClient.SetTLSClientConfig(insecureConf) + } r, err := rClient.R().SetOutput(updater).Get(url) if err != nil { a.Logger.Errorln(err) diff --git a/agent/checkin.go b/agent/checkin.go index 9990198..6c9923a 100644 --- a/agent/checkin.go +++ b/agent/checkin.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/checks.go b/agent/checks.go index 00925d7..930e947 100644 --- a/agent/checks.go +++ b/agent/checks.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/choco_windows.go b/agent/choco_windows.go index 5053f09..f75b15f 100644 --- a/agent/choco_windows.go +++ b/agent/choco_windows.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/eventlog_windows.go b/agent/eventlog_windows.go index c1313ef..f4c9fec 100644 --- a/agent/eventlog_windows.go +++ b/agent/eventlog_windows.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/install.go b/agent/install.go index 35c354c..1d6c75a 100644 --- a/agent/install.go +++ b/agent/install.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. @@ -12,6 +12,7 @@ https://license.tacticalrmm.com package agent import ( + "crypto/tls" "fmt" "io" "net/url" @@ -28,25 +29,27 @@ import ( ) type Installer struct { - Headers map[string]string - RMM string - ClientID int - SiteID int - Description string - AgentType string - Power bool - RDP bool - Ping bool - Token string - LocalMesh string - Cert string - Proxy string - Timeout time.Duration - SaltMaster string - Silent bool - NoMesh bool - MeshDir string - MeshNodeID string + Headers map[string]string + RMM string + ClientID int + SiteID int + Description string + AgentType string + Power bool + RDP bool + Ping bool + Token string + LocalMesh string + Cert string + Proxy string + Timeout time.Duration + SaltMaster string + Silent bool + NoMesh bool + MeshDir string + MeshNodeID string + Insecure bool + NatsStandardPort string } func (a *Agent) Install(i *Installer) { @@ -97,6 +100,14 @@ func (a *Agent) Install(i *Installer) { iClient.SetProxy(i.Proxy) } + insecureConf := &tls.Config{ + InsecureSkipVerify: true, + } + + if i.Insecure { + iClient.SetTLSClientConfig(insecureConf) + } + creds, cerr := iClient.R().Get(fmt.Sprintf("%s/api/v3/installer/", baseURL)) if cerr != nil { a.installerMsg(cerr.Error(), "error", i.Silent) @@ -133,6 +144,10 @@ func (a *Agent) Install(i *Installer) { rClient.SetProxy(i.Proxy) } + if i.Insecure { + rClient.SetTLSClientConfig(insecureConf) + } + var installerMeshSystemEXE string if len(i.MeshDir) > 0 { installerMeshSystemEXE = filepath.Join(i.MeshDir, "MeshAgent.exe") @@ -230,7 +245,7 @@ func (a *Agent) Install(i *Installer) { a.Logger.Debugln("Agent token:", agentToken) a.Logger.Debugln("Agent PK:", agentPK) - createAgentConfig(baseURL, a.AgentID, i.SaltMaster, agentToken, strconv.Itoa(agentPK), i.Cert, i.Proxy, i.MeshDir) + createAgentConfig(baseURL, a.AgentID, i.SaltMaster, agentToken, strconv.Itoa(agentPK), i.Cert, i.Proxy, i.MeshDir, i.NatsStandardPort, i.Insecure) time.Sleep(1 * time.Second) // refresh our agent with new values a = New(a.Logger, a.Version) diff --git a/agent/install_unix.go b/agent/install_unix.go index 1c9ba5d..b1e76b0 100644 --- a/agent/install_unix.go +++ b/agent/install_unix.go @@ -2,7 +2,7 @@ // +build !windows /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. @@ -33,7 +33,7 @@ func (a *Agent) installerMsg(msg, alert string, silent bool) { } } -func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, meshdir string) { +func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, meshdir, natsport string, insecure bool) { viper.SetConfigType("json") viper.Set("baseurl", baseurl) viper.Set("agentid", agentid) @@ -43,6 +43,10 @@ func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, me viper.Set("cert", cert) viper.Set("proxy", proxy) viper.Set("meshdir", meshdir) + viper.Set("natsstandardport", natsport) + if insecure { + viper.Set("insecure", "true") + } viper.SetConfigPermissions(0660) err := viper.SafeWriteConfigAs(etcConfig) if err != nil { diff --git a/agent/install_windows.go b/agent/install_windows.go index 3f8b630..aa2c434 100644 --- a/agent/install_windows.go +++ b/agent/install_windows.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. @@ -21,7 +21,7 @@ import ( "golang.org/x/sys/windows/registry" ) -func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, meshdir string) { +func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, meshdir, natsport string, insecure bool) { k, _, err := registry.CreateKey(registry.LOCAL_MACHINE, `SOFTWARE\TacticalRMM`, registry.ALL_ACCESS) if err != nil { log.Fatalln("Error creating registry key:", err) @@ -73,6 +73,20 @@ func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, me log.Fatalln("Error creating MeshDir registry key:", err) } } + + if len(natsport) > 0 { + err = k.SetStringValue("NatsStandardPort", natsport) + if err != nil { + log.Fatalln("Error creating NatsStandardPort registry key:", err) + } + } + + if insecure { + err = k.SetStringValue("Insecure", "true") + if err != nil { + log.Fatalln("Error creating Insecure registry key:", err) + } + } } func (a *Agent) checkExistingAndRemove(silent bool) { diff --git a/agent/patches_windows.go b/agent/patches_windows.go index 7d41baf..81c71cd 100644 --- a/agent/patches_windows.go +++ b/agent/patches_windows.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/process.go b/agent/process.go index ae7c392..b4d5f5a 100644 --- a/agent/process.go +++ b/agent/process.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/rpc.go b/agent/rpc.go index ed975d9..8ecae5c 100644 --- a/agent/rpc.go +++ b/agent/rpc.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/services_windows.go b/agent/services_windows.go index 75624f5..e782021 100644 --- a/agent/services_windows.go +++ b/agent/services_windows.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/software_windows_386.go b/agent/software_windows_386.go index 1be5cd0..b747268 100644 --- a/agent/software_windows_386.go +++ b/agent/software_windows_386.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/software_windows_amd64.go b/agent/software_windows_amd64.go index ce84005..bb5dc50 100644 --- a/agent/software_windows_amd64.go +++ b/agent/software_windows_amd64.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/svc.go b/agent/svc.go index eacc8c0..e7f03ea 100644 --- a/agent/svc.go +++ b/agent/svc.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/syscall_windows.go b/agent/syscall_windows.go index 26173ef..2d8b8c8 100644 --- a/agent/syscall_windows.go +++ b/agent/syscall_windows.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. @@ -24,11 +24,14 @@ var _ unsafe.Pointer var ( modadvapi32 = windows.NewLazySystemDLL("advapi32.dll") modkernel32 = windows.NewLazySystemDLL("kernel32.dll") + userenv = windows.NewLazyDLL("userenv.dll") procFormatMessageW = modkernel32.NewProc("FormatMessageW") procGetOldestEventLogRecord = modadvapi32.NewProc("GetOldestEventLogRecord") procLoadLibraryExW = modkernel32.NewProc("LoadLibraryExW") procReadEventLogW = modadvapi32.NewProc("ReadEventLogW") + procCreateEnvironmentBlock = userenv.NewProc("CreateEnvironmentBlock") + procDestroyEnvironmentBlock = userenv.NewProc("DestroyEnvironmentBlock") ) // https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-eventlogrecord @@ -114,3 +117,47 @@ func ReadEventLog(eventLog w32.HANDLE, readFlags ReadFlag, recordOffset uint32, } return } + +func CreateEnvironmentBlock(token syscall.Token) (*uint16, error) { + var envBlock *uint16 + + ret, _, err := procCreateEnvironmentBlock.Call( + uintptr(unsafe.Pointer(&envBlock)), + uintptr(token), + 0, + ) + if ret == 0 { + return nil, err + } + + return envBlock, nil +} + +func DestroyEnvironmentBlock(envBlock *uint16) error { + ret, _, err := procDestroyEnvironmentBlock.Call(uintptr(unsafe.Pointer(envBlock))) + if ret == 0 { + return err + } + return nil +} + +func EnvironmentBlockToSlice(envBlock *uint16) []string { + var envs []string + + for { + len := 0 + for *(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(envBlock)) + uintptr(len*2))) != 0 { + len++ + } + + if len == 0 { + break + } + + env := syscall.UTF16ToString((*[1 << 29]uint16)(unsafe.Pointer(envBlock))[:len]) + envs = append(envs, env) + envBlock = (*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(envBlock)) + uintptr((len+1)*2))) + } + + return envs +} diff --git a/agent/tasks_windows.go b/agent/tasks_windows.go index 086b80e..ab199f4 100644 --- a/agent/tasks_windows.go +++ b/agent/tasks_windows.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/utils.go b/agent/utils.go index 623126e..6eacaca 100644 --- a/agent/utils.go +++ b/agent/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/wmi_windows.go b/agent/wmi_windows.go index 194ecb0..13ca8ef 100644 --- a/agent/wmi_windows.go +++ b/agent/wmi_windows.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/agent/wua_windows.go b/agent/wua_windows.go index bc76230..913bcd4 100644 --- a/agent/wua_windows.go +++ b/agent/wua_windows.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. diff --git a/build/rmm.exe.manifest b/build/rmm.exe.manifest index a1ed766..f6a3836 100644 --- a/build/rmm.exe.manifest +++ b/build/rmm.exe.manifest @@ -3,7 +3,7 @@ diff --git a/build/setup.iss b/build/setup.iss index 7b18ad4..bc2ed6d 100644 --- a/build/setup.iss +++ b/build/setup.iss @@ -1,6 +1,6 @@ #define MyAppName "Tactical RMM Agent" -#define MyAppVersion "2.4.11" -#define MyAppPublisher "AmidaWare LLC" +#define MyAppVersion "2.5.0" +#define MyAppPublisher "AmidaWare Inc" #define MyAppURL "https://github.com/amidaware" #define MyAppExeName "tacticalrmm.exe" #define MESHEXE "meshagent.exe" diff --git a/go.mod b/go.mod index ac512b9..641c939 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/StackExchange/wmi v1.2.1 - github.com/elastic/go-sysinfo v1.11.0 + github.com/elastic/go-sysinfo v1.11.1 github.com/go-ole/go-ole v1.2.6 github.com/go-ping/ping v1.1.0 github.com/go-resty/resty/v2 v2.7.0 diff --git a/go.sum b/go.sum index 8ac1a15..13f963d 100644 --- a/go.sum +++ b/go.sum @@ -64,6 +64,8 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/elastic/go-sysinfo v1.11.0 h1:QW+6BF1oxBoAprH3w2yephF7xLkrrSXj7gl2xC2BM4w= github.com/elastic/go-sysinfo v1.11.0/go.mod h1:6KQb31j0QeWBDF88jIdWSxE8cwoOB9tO4Y4osN7Q70E= +github.com/elastic/go-sysinfo v1.11.1 h1:g9mwl05njS4r69TisC+vwHWTSKywZFYYUu3so3T/Lao= +github.com/elastic/go-sysinfo v1.11.1/go.mod h1:6KQb31j0QeWBDF88jIdWSxE8cwoOB9tO4Y4osN7Q70E= github.com/elastic/go-windows v1.0.1 h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0= github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= diff --git a/main.go b/main.go index 56dc178..cc302ca 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. @@ -25,7 +25,7 @@ import ( ) var ( - version = "2.4.11" + version = "2.5.0" log = logrus.New() logFile *os.File ) @@ -53,6 +53,8 @@ func main() { cert := flag.String("cert", "", "Path to domain CA .pem") silent := flag.Bool("silent", false, "Do not popup any message boxes during installation") proxy := flag.String("proxy", "", "Use a http proxy") + insecure := flag.Bool("insecure", false, "Insecure for testing only") + natsport := flag.String("natsport", "", "nats standard port") flag.Parse() if *ver { @@ -141,23 +143,25 @@ func main() { return } a.Install(&agent.Installer{ - RMM: *api, - ClientID: *clientID, - SiteID: *siteID, - Description: *desc, - AgentType: *atype, - Power: *power, - RDP: *rdp, - Ping: *ping, - Token: *token, - LocalMesh: *localMesh, - Cert: *cert, - Proxy: *proxy, - Timeout: *timeout, - Silent: *silent, - NoMesh: *noMesh, - MeshDir: *meshDir, - MeshNodeID: *meshNodeID, + RMM: *api, + ClientID: *clientID, + SiteID: *siteID, + Description: *desc, + AgentType: *atype, + Power: *power, + RDP: *rdp, + Ping: *ping, + Token: *token, + LocalMesh: *localMesh, + Cert: *cert, + Proxy: *proxy, + Timeout: *timeout, + Silent: *silent, + NoMesh: *noMesh, + MeshDir: *meshDir, + MeshNodeID: *meshNodeID, + Insecure: *insecure, + NatsStandardPort: *natsport, }) default: agent.ShowStatus(version) diff --git a/shared/types.go b/shared/types.go index 3fbf3f4..d7a6f24 100644 --- a/shared/types.go +++ b/shared/types.go @@ -1,5 +1,5 @@ /* -Copyright 2022 AmidaWare LLC. +Copyright 2023 AmidaWare Inc. Licensed under the Tactical RMM License Version 1.0 (the “License”). You may only use the Licensed Software in accordance with the License. @@ -48,6 +48,7 @@ type AgentConfig struct { NatsProxyPort string NatsStandardPort string NatsPingInterval int + Insecure string } type RunScriptResp struct { diff --git a/versioninfo.json b/versioninfo.json index 0d85476..b389cf0 100644 --- a/versioninfo.json +++ b/versioninfo.json @@ -2,14 +2,14 @@ "FixedFileInfo": { "FileVersion": { "Major": 2, - "Minor": 4, - "Patch": 11, + "Minor": 5, + "Patch": 0, "Build": 0 }, "ProductVersion": { "Major": 2, - "Minor": 4, - "Patch": 11, + "Minor": 5, + "Patch": 0, "Build": 0 }, "FileFlagsMask": "3f", @@ -20,16 +20,16 @@ }, "StringFileInfo": { "Comments": "", - "CompanyName": "AmidaWare LLC", + "CompanyName": "AmidaWare Inc", "FileDescription": "Tactical RMM Agent", - "FileVersion": "v2.4.11.0", + "FileVersion": "v2.5.0.0", "InternalName": "tacticalrmm.exe", - "LegalCopyright": "Copyright (c) 2023 AmidaWare LLC", + "LegalCopyright": "Copyright (c) 2023 AmidaWare Inc", "LegalTrademarks": "", "OriginalFilename": "tacticalrmm.exe", "PrivateBuild": "", "ProductName": "Tactical RMM Agent", - "ProductVersion": "v2.4.11.0", + "ProductVersion": "v2.5.0.0", "SpecialBuild": "" }, "VarFileInfo": {