File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
88
99# EngineScript Version
10- VARIABLES_DATE="SEPTEMBER 20 2023"
10+ VARIABLES_DATE="SEPTEMBER 28 2023"
1111
1212# Software Versions
1313MARIADB_VER="10.11"
@@ -19,7 +19,7 @@ PCRE2_VER="10.42"
1919PHP_VER="8.1"
2020PHPMYADMIN_VER="5.2.1"
2121PNGOUT_VER="20200115"
22- WORDFENCE_CLI_VER="1.0.1 "
22+ WORDFENCE_CLI_VER="1.1.0 "
2323ZLIB_VER="1.3"
2424
2525# Old Software Versions
Original file line number Diff line number Diff line change 2626
2727cd /var/www/sites
2828printf " 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 " html && echo " 10up Vulnerability Scanner is running. Scan may take a bit, standby for results."
29+ select d in * ; do test -n " $d " && break ; echo " >>> Invalid Selection" ; done
30+ cd " $d " / html && echo " 10up Vulnerability Scanner is running. Scan may take a bit, standby for results."
3131wp vuln status --allow-root
3232
3333# Ask user to acknowledge that the scan has completed before moving on
Original file line number Diff line number Diff line change 2626
2727cd /var/www/sites
2828printf " 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 " html && echo " PHP Malware Finder is running. Scan may take a bit, standby for results."
29+ select d in * ; do test -n " $d " && break ; echo " >>> Invalid Selection" ; done
30+ cd " $d " / html && echo " PHP Malware Finder is running. Scan may take a bit, standby for results."
3131yara -r /usr/local/bin/php-malware-finder/php-malware-finder/php.yar ./wp-content
3232
3333# Ask user to acknowledge that the scan has completed before moving on
Original file line number Diff line number Diff line change 2525# Start Main Script
2626
2727cd /var/www/sites
28- /usr/local/src/wordfence scan --output-path /home/EngineScript/wordfence-scan-results/wordfence-cli-scan-results.csv /usr/src
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 " /html && echo " WordPress CLI 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-scan-results.csv"
33+
34+ # Scan
35+ /usr/local/src/Wordfence-CLI/wordfence scan --progress --images --output-path /home/EngineScript/wordfence-scan-results/wordfence-cli-scan-results.csv /var/www/sites
2936
3037# Ask user to acknowledge that the scan has completed before moving on
3138echo " "
3239echo " "
33- echo " scan results will be located at:"
40+ echo " The scan results will be located at:"
3441echo " /home/EngineScript/wordfence-scan-results/wordfence-cli-scan-results.csv"
3542echo " "
3643read -n 1 -s -r -p " Press any key to continue"
Original file line number Diff line number Diff line change 2626
2727cd /var/www/sites
2828printf " Please select the site you want to scan for issues\n"
29- select d in * / ; do test -n " $d " && break ; echo " >>> Invalid Selection" ; done
30- cd " $d " html && echo " WP-CLI Doctor is running. Scan may take a bit, standby for results."
29+ select d in * ; do test -n " $d " && break ; echo " >>> Invalid Selection" ; done
30+ cd " $d " / html && echo " WP-CLI Doctor is running. Scan may take a bit, standby for results."
3131wp doctor check --allow-root
3232
3333# Ask user to acknowledge that the scan has completed before moving on
Original file line number Diff line number Diff line change 7575(crontab -l 2> /dev/null; echo " 51 5 1 * * cd /usr/local/bin/enginescript/scripts/functions/cron; bash ufw-cloudflare-cron.sh >/dev/null 2>&1" ) | crontab -
7676
7777# Update WP-CLI & Packages (daily)
78- (crontab -l 2> /dev/null; echo " 52 5 * * * cd /usr/local/bin/enginescript/scripts/functions/cron; bash wp-cli-update.sh >/dev/null 2>&1" ) | crontab -
78+ (crontab -l 2> /dev/null; echo " 52 5 * * * cd /usr/local/bin/enginescript/scripts/update; bash wp-cli-update.sh >/dev/null 2>&1" ) | crontab -
79+
80+ # Update Wordfence CLI (daily)
81+ (crontab -l 2> /dev/null; echo " 53 5 * * * cd /usr/local/bin/enginescript/scripts/update; bash wordfence-cli-update.sh >/dev/null 2>&1" ) | crontab -
7982
8083# Reset Ownership & Permissions for WordPress and EngineScript (daily)
8184(crontab -l 2> /dev/null; echo " 54 5 * * * cd /usr/local/bin/enginescript/scripts/functions/cron; bash permissions.sh >/dev/null 2>&1" ) | crontab -
Original file line number Diff line number Diff line change 2727# Wordfence CLI Malware scanner
2828
2929# Install
30- cd /usr/local/src
31- wget https://github.com/wordfence/wordfence-cli/releases/download/v${WORDFENCE_CLI_VER} /wordfence_${WORDFENCE_CLI_VER} _amd64_linux_exec.tar.gz --no-check-certificate
32- tar xvzf wordfence_${WORDFENCE_CLI_VER} _amd64_linux_exec.tar.gz
30+ mkdir -p /usr/local/src/Wordfence-CLI/
31+ rm -rf /usr/local/src/Wordfence-CLI/wordfence
32+ wget -O /usr/src/wordfence_${WORDFENCE_CLI_VER} _amd64_linux_exec.tar.gz https://github.com/wordfence/wordfence-cli/releases/download/v${WORDFENCE_CLI_VER} /wordfence_${WORDFENCE_CLI_VER} _amd64_linux_exec.tar.gz --no-check-certificate
33+ tar -xvf /usr/src/wordfence_${WORDFENCE_CLI_VER} _amd64_linux_exec.tar.gz
34+ mv /usr/src/wordfence /usr/local/src/Wordfence-CLI/wordfence
35+
36+ # Make Results Directory
3337mkdir -p /home/EngineScript/wordfence-scan-results
38+
39+ # Make Cache Directory
3440mkdir -p ~ /.cache/wordfence
35- mkdir -p ~ /.config/wordfence
3641chmod 775 ~ /.cache/wordfence
37- touch ~ /.config/wordfence/wordfence-cli.ini
3842
3943# Configuration
4044# Create your token at https://www.wordfence.com/products/wordfence-cli/
45+ mkdir -p ~ /.config/wordfence
46+ touch ~ /.config/wordfence/wordfence-cli.ini
4147cat >> ~/.config/wordfence/wordfence-cli.ini << EOL
4248[SCAN]
4349license = ${WORDFENCE_CLI_TOKEN}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ while true
3232 echo " "
3333 echo " "
3434 PS3=' Please enter your choice: '
35- secoptions=(" 10up WP-CLI Vulnerability Scanner " " PHP Malware Finder" " Wordfence CLI Malware Scan" " WPScan Vulnerability Scan" " Exit Security Tools" )
35+ secoptions=(" 10up WP-CLI Vulnerability Scan " " PHP Malware Finder" " Wordfence CLI Malware Scan" " WPScan Vulnerability Scan" " Exit Security Tools" )
3636 select secopt in " ${secoptions[@]} "
3737 do
3838 case $secopt in
Original file line number Diff line number Diff line change 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+ # ----------------------------------------------------------------------------
28+
29+ # Update Wordfence CLI
30+ rm -rf /usr/local/src/Wordfence-CLI/wordfence
31+ wget -O /usr/src/wordfence_${WORDFENCE_CLI_VER} _amd64_linux_exec.tar.gz https://github.com/wordfence/wordfence-cli/releases/download/v${WORDFENCE_CLI_VER} /wordfence_${WORDFENCE_CLI_VER} _amd64_linux_exec.tar.gz --no-check-certificate
32+ tar -xvf /usr/src/wordfence_${WORDFENCE_CLI_VER} _amd64_linux_exec.tar.gz
33+ mv /usr/src/wordfence /usr/local/src/Wordfence-CLI/wordfence
File renamed without changes.
You can’t perform that action at this time.
0 commit comments