From: Roland Häder Date: Sat, 5 Oct 2024 20:04:40 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fffb354b08e1a94c228cca4534f8d5b02de316d7;p=fba.git Continued: - added locally used scripts, can be useful to someone else, too --- 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."