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

    Mac's open command - too powerful

    Mac
    2
    3
    2.1k
    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

      I don't actually recommend this because, as the title suggests, there's a potential security risk here if someone gets ahold of your password or token, but it's still pretty cool to play with and it solved this problem so I thought I'd post it as an example.

      I added a command to my mac that runs the "open" command and enabled parameters.

      Then I used the /triggercmd "slash command" with the TRIGGERcmd Slack app to open Finder to my desktop folder:

      /triggercmd open on mac with ~/Desktop
      

      Here's the dangerous bit: I also found I could run any arbitrary command on my mac.

      For example I could also run calculator with this command:

      /triggercmd open on mac with -a calculator
      

      The "open" command is a little too powerful because it lets you run any command. So if you do this, don't give out your token or password to triggercmd.com (it's never a good idea to give those out anyway).

      I warned you but in case you want to do it anyway:

      • Use the GUI editor to add a command called open with open as the command, and enable parameters.

      • Go here and click the Add to Slack button.

      • Go to the Instructions page and copy your token.

      • In Slack, run this slash command to link your Slack account with your TRIGGERcmd account:

           /triggercmd-token [paste your token here]
        
      • Then run this slash command to test it:

           /triggercmd open on mac with ~/Desktop
        
      • Profit.

      If you just want to open Calculator, a safer Slack command would be this, which runs the built-in calculator command on your default computer.

      /triggercmd calculator
      

      Russell VanderMey

      1 Reply Last reply Reply Quote 0
      • Felipe MartinsF
        Felipe Martins
        last edited by

        how do i configure "my workspace" on slack?

        RussR 1 Reply Last reply Reply Quote 0
        • RussR
          Russ @Felipe Martins
          last edited by Russ

          @Felipe-Martins, log into your Slack workspace in a browser, then in the same browser, go here to add the TRIGGERcmd Slack app to your workspace:

          https://www.triggercmd.com/user/auth/slack

          If that doesn't answer your question, let me know and I'll elaborate, and add more details here.

          Russell VanderMey

          1 Reply Last reply Reply Quote 0
          • First post
            Last post