From fffb354b08e1a94c228cca4534f8d5b02de316d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 5 Oct 2024 22:04:40 +0200 Subject: [PATCH] Continued: - added locally used scripts, can be useful to someone else, too --- check-instances.sh | 22 ++++++++++++++++++++++ recheck.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100755 check-instances.sh create mode 100755 recheck.sh diff --git a/check-instances.sh b/check-instances.sh new file mode 100755 index 0000000..e465d88 --- /dev/null +++ b/check-instances.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +DOMAIN_LIST="" + +if [ "$1" = "--help" -o -z "$1" -o ! -f "$1" ] +then + echo "Usage: $0 " + 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 index 0000000..7dc8380 --- /dev/null +++ b/recheck.sh @@ -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 " + 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." -- 2.39.5