wqebhooky
This commit is contained in:
+21
-1
@@ -1,6 +1,26 @@
|
||||
#!/bin/bash
|
||||
set -e # faiulure is not tolerated here
|
||||
## easy to add ids~
|
||||
vendor_ids=('00:25:DF' '00:58:28' '00:C0:D4' '84:70:03')
|
||||
|
||||
send_discord_webhook() {
|
||||
local username="DreamMaker"
|
||||
local webhook_url="${DISCORD_WEBHOOK_URL:-}"
|
||||
local tag="${DISCORD_WEBHOOK_TAG:-}"
|
||||
local message="$1 $tag"
|
||||
|
||||
if [ -z "$webhook_url" ]; then
|
||||
echo "DISCORD_WEBHOOK_URL ENVVAR is not set" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
curl -sS -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"username\":\"${username}\",\"content\":\"${message}\"}" \
|
||||
"$webhook_url"
|
||||
}
|
||||
|
||||
|
||||
while true; do #infinite loop
|
||||
# scan for those vendor ids
|
||||
blescan=$(bluetoothctl -t 5 scan on | awk '{print $3}' | grep "${vendor_ids[@]/#/-e }")
|
||||
@@ -8,7 +28,7 @@ while true; do #infinite loop
|
||||
# LE detected poweroff to cryptdisk and notify
|
||||
# alert spammmm
|
||||
for((i=0;i<10;i++)); do
|
||||
webhook "FUZZ" true& # fork task to background to run more faster
|
||||
send_discord_webhook "FUZZ" & # fork task to background to run more faster
|
||||
done
|
||||
# cryptsetup erase <device> # ion case you wanna nuke ur shit lmao
|
||||
## these options are powerful, silent, fast, aND RIsky
|
||||
|
||||
Reference in New Issue
Block a user