Skip to content

Commit c086698

Browse files
committed
Added .php in uploads directory script
other minor changes.
1 parent 84fa6c1 commit c086698

4 files changed

Lines changed: 46 additions & 3 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 issues\n"
29+
select d in *; do test -n "$d" && break; echo ">>> Invalid Selection"; done
30+
cd "$d"/html && echo "Locating .php files in the uploads directory. Scan may take a bit, standby for results."
31+
echo -e "\n\nThis could indicate a security issue and/or risk on your server.\nNot everything is dangerous, so research thoroughly before taking any action.\n\nFound the following .php files:"
32+
find ./wp-content/uploads -name "*.php"
33+
34+
# Ask user to acknowledge that the scan has completed before moving on
35+
echo ""
36+
echo ""
37+
read -n 1 -s -r -p "Press any key to continue"
38+
echo ""
39+
echo ""
File renamed without changes.

scripts/menu/security-tools-menu.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,18 @@ while true
3232
echo ""
3333
echo ""
3434
PS3='Please enter your choice: '
35-
secoptions=("10up WP-CLI Vulnerability Scan" "PHP Malware Finder" "Wordfence CLI Malware Scan" "WP-CLI Doctor" "WPScan Vulnerability Scan" "Exit Security Tools")
35+
secoptions=("10up WP-CLI Vulnerability Scan" "Find PHP Files in Uploads Directory" "PHP Malware Finder" "Wordfence CLI Malware Scan" "WP-CLI Doctor" "WPScan Vulnerability Scan" "Exit Security Tools")
3636
select secopt in "${secoptions[@]}"
3737
do
3838
case $secopt in
3939
"10up WP-CLI Vulnerability Scan")
4040
/usr/local/bin/enginescript/scripts/functions/security/10up-vuln-scanner.sh
4141
break
4242
;;
43+
"Find PHP Files in Uploads Directory")
44+
/usr/local/bin/enginescript/scripts/functions/security/find-php-in-uploads.sh
45+
break
46+
;;
4347
"PHP Malware Finder")
4448
/usr/local/bin/enginescript/scripts/functions/security/php-malware-finder.sh
4549
break
@@ -49,7 +53,7 @@ while true
4953
break
5054
;;
5155
"WP-CLI Doctor")
52-
/usr/local/bin/enginescript/scripts/functions/server-tools/wp-cli-doctor.sh
56+
/usr/local/bin/enginescript/scripts/functions/security/wp-cli-doctor.sh
5357
break
5458
;;
5559
"WPScan Vulnerability Scan")

var/www/wordpress/wp-config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
//define( 'WP_REDIS_DISABLED', 'true' ); // Emergency disable method
4343
//define( 'WP_REDIS_IGBINARY', 'true' ); // Better compression. Saves memory, slower
4444
//define( 'WP_REDIS_IGNORED_GROUPS', 'PLACEHOLDER' );
45-
define( 'WP_REDIS_MAXTTL', '43200' ); // 43200 seconds = 12 Hours
45+
define( 'WP_REDIS_MAXTTL', '43200' ); // 43200 seconds = 12 hours
4646
//define( 'WP_REDIS_PASSWORD', 'PLACEHOLDER' );
4747
define( 'WP_REDIS_PATH', '/run/redis/redis-server.sock' );
4848
define( 'WP_REDIS_PREFIX', 'SEDREDISPREFIX' );

0 commit comments

Comments
 (0)