TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    tcmd GO command line tool is available now

    Windows
    1
    1
    3.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RussR
      Russ
      last edited by Russ

      Thanks to @Xander's feature request, I created a command line tool you can use instead of curl to run commands on your remote computer.

      I wrote it in Go so I could easily compile a version for each OS, like Linux, Windows or Mac (Darwin), and each CPU architecture like 32bit (386) or 64bit (amd64).

      Just download the tool you need for your OS, and rename it to tcmd. The rename is not required, but I recommend it for consistency.

      These are the versions:

      Mac 32bit
      Mac 64bit
      Linux 32bit
      Linux 64bit
      Linux arm (Raspberry Pi)
      Windows 32bit
      Windows 64bit (most common)

      Here's an example from my Raspberry Pi:

      wget https://triggercmdagents.s3.amazonaws.com/tcmd_cli/tcmd-linux-arm
      sudo mv tcmd-linux-arm /usr/local/tcmd
      chmod +x /usr/local/tcmd
      tcmd
      No trigger specified.  Use --help or -h for help.
      
      tcmd -h
      NAME:
              tcmd - Run commands on computers in your TRIGGERcmd account
            USAGE:
              tcmd [options]
          
            OPTIONS:
              --trigger value, -t value   Trigger name of the command you want to run
              --computer value, -c value  Name of the computer (leave blank for your default computer)
              --params value, -p value    Any parameters you want to add to the remote command
              --panel value, -P value     Name of the panel you want to use
              --button value, -b value    Name of the panel button to "press"
              --list, -l                  List your commands
              --listpanels, -L            List your panels
              --pair                      Login using a pair code
              --help, -h                  show help
              --version, -v               print the version ds -t calculator
      
      tcmd -c ds -t calculator
      {"data":    {"user":"68bh2a75f2f63133334755d1","computer":"5a2f8be70f383803178e0dee","name":"Calculator","voice":"calculator","voiceReply":null,"allowParams":false,"runCount":24,"createdAt":"2018-03-30T22:59:35.862Z","updatedAt":"2018-06-23T15:48:04.031Z","id":"5abec157a745e8110063aa18"},"message":"Trigger sent."}
      

      If you want to see the source code, check out https://github.com/rvmey/triggercmdGOclient

      If you want to run the Linux version in Windows WSL, you'll want to copy your token.tkn file to your home folder like this:

      mkdir ~/.TRIGGERcmdData
      cp /mnt/c/Users/Russ/.TRIGGERcmdData/token.tkn ~/.TRIGGERcmdData/
      tcmd -computer DS -trigger notepad -params russ.txt
      

      EDIT 1/13/20: Now you can pass multiple parameters.
      EDIT 2/4/20: Added a --list parameter to list possible tcmd commands.
      EDIT 7/24/21: Added --pair parameter to use a pair code to get a token. FYI if you've installed the agent you already have a token.

      Russell VanderMey

      1 Reply Last reply Reply Quote 0
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • tuicemenT tuicemen referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ referenced this topic on
      • RussR Russ moved this topic from Announcements on
      • RussR Russ pinned this topic on
      • First post
        Last post