|
| 1 | +#!/usr/bin/env bash |
| 2 | +#---------------------------------------------------------------------------- |
| 3 | +# EngineScript - A High-Performance WordPress Server Built on Ubuntu and Cloudflare |
| 4 | +#---------------------------------------------------------------------------- |
| 5 | +# Website: https://EngineScript.com |
| 6 | +# GitHub: https://github.com/Enginescript/EngineScript |
| 7 | +# Company: VisiStruct / EngineScript |
| 8 | +# License: GPL v3.0 |
| 9 | +# OS: Ubuntu 22.04 (jammy) |
| 10 | +#---------------------------------------------------------------------------- |
| 11 | + |
| 12 | +# EngineScript Variables |
| 13 | +source /usr/local/bin/enginescript/enginescript-variables.txt |
| 14 | +source /home/EngineScript/enginescript-install-options.txt |
| 15 | + |
| 16 | +# Check current user's ID. If user is not 0 (root), exit. |
| 17 | +if [ "${EUID}" != 0 ]; |
| 18 | + then |
| 19 | + echo "${BOLD}ALERT:${NORMAL}" |
| 20 | + echo "EngineScript should be executed as the root user." |
| 21 | + exit |
| 22 | +fi |
| 23 | + |
| 24 | +#---------------------------------------------------------------------------- |
| 25 | +# Start Main Script |
| 26 | + |
| 27 | +cd /var/www/sites |
| 28 | +printf "Please select the site you want to scan for vulnerabilities:\n" |
| 29 | +select d in *; do test -n "$d" && break; echo ">>> Invalid Selection"; done |
| 30 | +cd "$d" && echo "WordPress CLI vulnerability scan is running. This scan may take a bit, standby for results." |
| 31 | +echo "When completed, the scan results will be located at:" |
| 32 | +echo "/home/EngineScript/wordfence-scan-results/wordfence-cli-vulnerability-scan-results.csv" |
| 33 | + |
| 34 | +# Scan |
| 35 | +wordfence vuln-scan --images --output-path /home/EngineScript/wordfence-scan-results/wordfence-cli-vulnerability-scan-results.csv /var/www/sites/${d}/html |
| 36 | + |
| 37 | +# Ask user to acknowledge that the scan has completed before moving on |
| 38 | +echo "" |
| 39 | +echo "" |
| 40 | +echo "The scan results will be located at:" |
| 41 | +echo "/home/EngineScript/wordfence-scan-results/wordfence-cli-vulnerability-scan-results.csv" |
| 42 | +echo "" |
| 43 | +read -n 1 -s -r -p "Press any key to continue" |
| 44 | +echo "" |
| 45 | +echo "" |
0 commit comments