Skip to content

Commit

Permalink
Finalizing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness authored Jan 17, 2025
1 parent c062291 commit c67d4f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/tools/check_all_pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ tmpFile1=$(mktemp)
tmpFile2=$(mktemp)
logFile1=$(mktemp)
cookieFile=$(mktemp)
loadSaveCookie="--load-cookies=\"${cookieFile}\" --keep-session-cookies --save-cookies=\"${cookieFile}\""
loadSaveCookie="--load-cookies \"${cookieFile}\" --keep-session-cookies --save-cookies \"${cookieFile}\""
started=1

# ------------------------------------------------------------------------------
Expand All @@ -408,7 +408,7 @@ echo "---------------------------------------------------------------------"
echo "Starting Web Based Page Validation"
echo "---------------------------------------------------------------------"
echo "NOTE: Saving Cookie Data"
wget --no-check-certificate --keep-session-cookies --save-cookies "$cookieFile" --output-document="$tmpFile1" "$WEBHOST/index.php"
wget -q --no-check-certificate --keep-session-cookies --save-cookies "$cookieFile" --output-document="$tmpFile1" "$WEBHOST/index.php"

# ------------------------------------------------------------------------------
# Prototype: var csrfMagicToken='sid:8ee86e9ddb8bcac8e377dfbb6c3d6d054854b6a9,1737054220';
Expand All @@ -417,15 +417,15 @@ magic=$(grep "var csrfMagicToken='" "${tmpFile1}" | sed "s/.*var csrfMagicToken=
postData="action=login&login_username=${WAUSER}&login_password=${WAPASS}&__csrf_magic=${magic}"

echo "NOTE: Logging into the Cacti User Interface"
wget --no-check-certificate "$loadSaveCookie" --post-data="${postData}" --output-document="${tmpFile2}" "${WEBHOST}/index.php"
wget -q --no-check-certificate $loadSaveCookie --post-data="${postData}" --output-document="${tmpFile2}" "${WEBHOST}/index.php"

# ------------------------------------------------------------------------------
# Now loop over all the available links (but don't log out and don't delete or
# remove, don't uninstall, enable or disable plugins stuff.
# ------------------------------------------------------------------------------
echo "NOTE: Recursively Checking all Base and Enabled Plugin Pages"
echo "NOTE: This will take several minutes!!!"
wget --no-check-certificate "$loadSaveCookie" --output-file="${logFile1}" --reject-regex="(logout\.php|remove|delete|uninstall|install|disable|enable)" --recursive --level=0 --execute=robots=off "${WEBHOST}/index.php"
wget --no-check-certificate $loadSaveCookie --output-file="${logFile1}" --reject-regex="(logout\.php|remove|delete|uninstall|install|disable|enable)" --recursive --level=0 --execute=robots=off "${WEBHOST}/index.php"
error=$?

if [ $error -eq 8 ]; then
Expand Down

0 comments on commit c67d4f2

Please sign in to comment.