From afb17bbc85d5680b5ea80513edab860e636b8d79 Mon Sep 17 00:00:00 2001 From: adam Date: Sun, 30 Mar 2025 16:06:31 -0400 Subject: [PATCH] lsightly more secure --- bash/miscChat.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bash/miscChat.sh b/bash/miscChat.sh index 74800ed..3a9688f 100755 --- a/bash/miscChat.sh +++ b/bash/miscChat.sh @@ -1,8 +1,7 @@ #!/bin/bash -#msg="\"{\\\"content\\\":\\\"$@\\\"}\"" -msg="{\"content\":\"$@\"}" -echo $msg +msgString=$@ -curl -H "Content-Type: application/json" -d "$msg" \ - #WEBHOOK URL \ No newline at end of file +curl -XPOST \ + -d "$(jq -cn --arg msgtype 'm.text' --arg body "$msgString" '{msg: $ARGS.named}' | jq -s add | jq .msg)" \ + #WEBHOOK URL