]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 5 Oct 2024 20:04:40 +0000 (22:04 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 5 Oct 2024 20:04:40 +0000 (22:04 +0200)
- added locally used scripts, can be useful to someone else, too

check-instances.sh [new file with mode: 0755]
recheck.sh [new file with mode: 0755]

diff --git a/check-instances.sh b/check-instances.sh
new file mode 100755 (executable)
index 0000000..e465d88
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+DOMAIN_LIST=""
+
+if [ "$1" = "--help" -o -z "$1" -o ! -f "$1" ]
+then
+       echo "Usage: $0 <file>"
+       exit 255
+fi
+
+DOMAIN_LIST=$(cat "$1")
+
+if [ -n "${DOMAIN_LIST}" ]
+then
+       for DOMAIN in ${DOMAIN_LIST};
+       do
+               echo "$0: DOMAIN='${DOMAIN}'"
+               ./fba.py check_instance --domain="${DOMAIN}"
+       done
+fi
+
+echo "$0: All done."
diff --git a/recheck.sh b/recheck.sh
new file mode 100755 (executable)
index 0000000..7dc8380
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+DOMAIN_LIST=""
+SOFTWARE_LIST=""
+TEMP_FILE="${TMP}/domains.tmp"
+
+if [ "$1" = "--help" -o -z "$1" ]
+then
+       echo "Usage: $0 <file>"
+       exit 255
+elif [ -n "$1" -a -f "$1" ]
+then
+       DOMAIN_LIST=$(cat "$1")
+       if [ -z "${DOMAIN_LIST}" ]
+       then
+               echo "$0: No domains found!"
+               exit 255
+       fi
+fi
+
+for DOMAIN in ${DOMAIN_LIST};
+do
+       echo "$0: DOMAIN='${DOMAIN}'"
+       ./fba.py recheck_obfuscation --domain="${DOMAIN}" --force
+       STATUS="$?"
+       if [ "${STATUS}" != "0" ]
+       then
+               echo "$0: Failed!"
+               continue
+       fi
+
+       grep -v "${DOMAIN}" "$1" > "${TEMP_FILE}"
+       mv "${TEMP_FILE}" "$1"
+done
+
+echo "$0: All done."