Skip to main content
The pre-compiled Merlin Agent for Windows is compiled with an option that prevents the program from showing. Double clicking the merlinAgent-Windows-x64.exe file will launch the agent and it will connect to the hard coded URL (default is https://127.0.0.1:443/). The agent will eventually die once it fails to contact the server.Solutions:
  • Recompile merlinAgent with the hard coded URL of your server
  • Run it from the command line using the -url flag to specify your server
  • View the custom agent page for details on building and compiling the agent from source
  • The agent can be compiled without the -H=windowsgui so that it doesn’t disappear when executed by double clicking the file
The biggest contributor for getting errors while compiling is forgetting to ensure the GOPATH environment variable is set.Solution: View the custom agent page for details on ensuring the environment is configured properly.
Pipes | and redirectors < and > are functions of a shell. By default, Merlin only executes programs in the host’s PATH variable.Solutions:
  • Use the shell command
  • Specify the shell (i.e /bin/bash) when using the run command
Because Merlin spawns a process for every command, the shell is not persistent or interactive. This requires the operator to combine multiple commands together so that they are all in the same context/environment.Example:
Merlin[agent][c1090dbc-f2f7-4d90-a241-86e0c0217786]»shell /bin/sh -c "ls -l > /tmp/out.txt"