Skip to content

Commit

Permalink
Merge pull request #38 from NiceGuyIT/feature/cross-platform-scripting
Browse files Browse the repository at this point in the history
[Feature] Add cross site scripting
  • Loading branch information
wh1te909 authored Feb 22, 2024
2 parents 729e568 + 2afdfd7 commit dc10c33
Show file tree
Hide file tree
Showing 13 changed files with 923 additions and 72 deletions.
22 changes: 22 additions & 0 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ type Agent struct {
MeshSystemEXE string
MeshSVC string
PyBin string
NuBin string
DenoBin string
Headers map[string]string
Logger *logrus.Logger
Version string
Expand Down Expand Up @@ -86,6 +88,8 @@ const (
nixAgentDir = "/opt/tacticalagent"
nixMeshDir = "/opt/tacticalmesh"
nixAgentBin = nixAgentDir + "/tacticalagent"
nixAgentBinDir = nixAgentDir + "/bin"
nixAgentEtcDir = nixAgentDir + "/etc"
nixMeshAgentBin = nixMeshDir + "/meshagent"
macPlistPath = "/Library/LaunchDaemons/tacticalagent.plist"
macPlistName = "tacticalagent"
Expand Down Expand Up @@ -119,6 +123,22 @@ func New(logger *logrus.Logger, version string) *Agent {
pybin = filepath.Join(pd, "py38-x32", "python.exe")
}

var nuBin string
switch runtime.GOOS {
case "windows":
nuBin = filepath.Join(pd, "bin", "nu.exe")
default:
nuBin = filepath.Join(nixAgentBinDir, "nu")
}

var denoBin string
switch runtime.GOOS {
case "windows":
denoBin = filepath.Join(pd, "bin", "deno.exe")
default:
denoBin = filepath.Join(nixAgentBinDir, "deno")
}

ac := NewAgentConfig()

headers := make(map[string]string)
Expand Down Expand Up @@ -232,6 +252,8 @@ func New(logger *logrus.Logger, version string) *Agent {
MeshSystemEXE: MeshSysExe,
MeshSVC: meshSvcName,
PyBin: pybin,
NuBin: nuBin,
DenoBin: denoBin,
Headers: headers,
Logger: logger,
Version: version,
Expand Down
Loading

0 comments on commit dc10c33

Please sign in to comment.