Issue when passing URL as parameter
-
I have the very simple trigger that runs
curl [params]
So I can make GET requests to a local address remotely via the triggerCMD API. (If you think this is a work around using localtunnel or ngrok, it is exactly that)
My triggerCMD API request looks like this
https://www.triggercmd.com/api/run/triggerSave?computer=<MY_COMPUTER>&trigger=curl&token=<MY-TOKEN>¶ms="http://localhost:4040/webhook/id?par1=1&par2=b&par3=temp"
The request only passes the first argument (par1 = 1), making me think the "&" character is improperly interpreted, despite being between quotes.
The curl command runs correctly through the terminal
curl "http://localhost:4040/webhook/id?par1=1&par2=b&par3=temp"
passing all three arguments, again adding weight to the possibility that the API call is doing something to URL when passed as parameter.
Any insight on how I could get this to work would be greatly appreciated!
-
@caio-kenup, I'll mention this setting in your profile, but you may have already found it:
I blocked those characters by default because they could be used to run arbitrary commands if parameters are enabled.
A safer way to do what you're trying to do would be to use a script that takes a series of parameters like this:
Linux/Mac bash script:
set -x curl "http://localhost:4040/webhook/id?par1=$1&par2=$2&par3=$3"
Make it executable with chmod +x ./script.sh
Test it with: ./script.bat a b cWindows script:
curl "http://localhost:4040/webhook/id?par1=$1&par2=$2&par3=$3"
Test it with: script.bat a b c