From fd771621e93333519cc23694698c5d75721787a5 Mon Sep 17 00:00:00 2001 From: MeaTLoTioN Date: Fri, 15 Oct 2021 18:06:46 +0100 Subject: [PATCH] initial commit --- twitupd.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 twitupd.sh diff --git a/twitupd.sh b/twitupd.sh new file mode 100644 index 0000000..c995780 --- /dev/null +++ b/twitupd.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +MYS_DATA="/mystic/data" +MYS_LOGS="/mystic/logs" + +IFS=$'\n' +for I in $(curl https://www.erb.pw/blacklist 2>/dev/null); do + CHECK=$(grep -c $I $MYS_DATA/blacklist.txt) + if [[ $CHECK -lt 1 ]]; then + echo $I >> $MYS_DATA/blacklist.txt + echo "[+] $I" + echo "$(date) [+] $I" >> $MYS_LOGS/twitupd.log + else + echo "[✔] $I" + echo "$(date) [✔] $I" >> $MYS_LOGS/twitupd.log + fi +done