Skip to content
Snippets Groups Projects
Commit c80d4944 authored by nimrod's avatar nimrod
Browse files

Handle forms in spammer.

With the new spam page in my site, I'm using an HTML form. Handle both
the simpler POSTs and the HTML forms.
parent 869d3f58
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
set -eu
URL='https://patchbay.pub/pubsub/1446c969-9a54-4b5b-83e0-bf88f22f289d'
while true
do
# Backoff in case of an error.
if ! notify-send \
message="$(curl --silent "$URL")"
exitstatus="$?"
if echo "$message" | grep --silent '^message='
then
message="$(echo "$message" | sed 's/message=//; s/+/ /g')"
fi
notify-send \
--urgency low \
--hint "string:desktop-entry:spammer" \
"$(curl --silent https://patchbay.pub/pubsub/1446c969-9a54-4b5b-83e0-bf88f22f289d)"
"$message"
# Backoff in case of an error.
if [ "$exitstatus" -gt '0' ]
then
sleep 1
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment