Compare commits
3 Commits
8ed874f0dc
...
5ffc073734
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ffc073734 | |||
| af17d8237b | |||
| bf9add98bc |
@@ -66,7 +66,7 @@ print_section() {
|
|||||||
local title="$1"
|
local title="$1"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}$title${NC}"
|
echo -e "${BOLD}$title${NC}"
|
||||||
echo "-------------------------------------------------------------------------------"
|
echo "───────────────────────────────────────────────────────────────────────────────"
|
||||||
}
|
}
|
||||||
|
|
||||||
print_info() {
|
print_info() {
|
||||||
|
|||||||
+4
-4
@@ -429,7 +429,7 @@ select_user_interactive() {
|
|||||||
print_section "$prompt"
|
print_section "$prompt"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Found $total_users user(s) on this server"
|
echo "Found $total_users user(s) on this server"
|
||||||
echo "-------------------------------------------------------------------------------"
|
echo "───────────────────────────────────────────────────────────────────────────────"
|
||||||
|
|
||||||
# Auto-show list if 10 or fewer users
|
# Auto-show list if 10 or fewer users
|
||||||
if [ "${total_users:-0}" -le 10 ]; then
|
if [ "${total_users:-0}" -le 10 ]; then
|
||||||
@@ -440,7 +440,7 @@ select_user_interactive() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "-------------------------------------------------------------------------------"
|
echo "───────────────────────────────────────────────────────────────────────────────"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
if [ "${total_users:-0}" -gt 10 ]; then
|
if [ "${total_users:-0}" -gt 10 ]; then
|
||||||
@@ -531,11 +531,11 @@ select_user_interactive() {
|
|||||||
{
|
{
|
||||||
echo ""
|
echo ""
|
||||||
echo "Complete user list ($total_users users):"
|
echo "Complete user list ($total_users users):"
|
||||||
echo "-------------------------------------------------------------------------------"
|
echo "───────────────────────────────────────────────────────────────────────────────"
|
||||||
for user in "${users[@]}"; do
|
for user in "${users[@]}"; do
|
||||||
echo -e " ${GREEN}$user${NC} - ${user_primary_domain[$user]} (${user_domain_count[$user]} domains)"
|
echo -e " ${GREEN}$user${NC} - ${user_primary_domain[$user]} (${user_domain_count[$user]} domains)"
|
||||||
done
|
done
|
||||||
echo "-------------------------------------------------------------------------------"
|
echo "───────────────────────────────────────────────────────────────────────────────"
|
||||||
echo ""
|
echo ""
|
||||||
} >&2
|
} >&2
|
||||||
# Ask again after showing list
|
# Ask again after showing list
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ show_log_menu() {
|
|||||||
echo -e " ${GREEN}e)${NC} Show Errors Only"
|
echo -e " ${GREEN}e)${NC} Show Errors Only"
|
||||||
echo -e " ${GREEN}a)${NC} Archive Old Logs"
|
echo -e " ${GREEN}a)${NC} Archive Old Logs"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e " ${RED}0)${NC} Return to Menu"
|
echo -e " ${RED}0)${NC} Back"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${CYAN}──────────────────────────────────────────────────────────────${NC}"
|
echo -e "${CYAN}──────────────────────────────────────────────────────────────${NC}"
|
||||||
echo -n "Select option: "
|
echo -n "Select option: "
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ show_main_menu() {
|
|||||||
cecho " ${YELLOW}b${NC}) Backup Current Configurations"
|
cecho " ${YELLOW}b${NC}) Backup Current Configurations"
|
||||||
cecho " ${YELLOW}r${NC}) Restore from Backup"
|
cecho " ${YELLOW}r${NC}) Restore from Backup"
|
||||||
echo ""
|
echo ""
|
||||||
cecho " ${RED}q${NC}) Quit"
|
cecho " ${RED}0${NC}) Exit"
|
||||||
echo ""
|
echo ""
|
||||||
cecho "${CYAN}─────────────────────────────────────────────────────────────────────${NC}"
|
cecho "${CYAN}─────────────────────────────────────────────────────────────────────${NC}"
|
||||||
}
|
}
|
||||||
@@ -1501,7 +1501,7 @@ check_server_memory_capacity() {
|
|||||||
local header
|
local header
|
||||||
header=$(echo "$recommendations" | head -1)
|
header=$(echo "$recommendations" | head -1)
|
||||||
echo "$header" | awk -F'|' '{printf "%-15s %8s %10s %12s %12s %15s %20s\n", $1, $2, $3, $4, $5, $6, $7}'
|
echo "$header" | awk -F'|' '{printf "%-15s %8s %10s %12s %12s %15s %20s\n", $1, $2, $3, $4, $5, $6, $7}'
|
||||||
echo "--------------------------------------------------------------------------------------------------------"
|
echo "────────────────────────────────────────────────────────────────────────────────────────────────────────"
|
||||||
|
|
||||||
# Display recommendations
|
# Display recommendations
|
||||||
echo "$recommendations" | tail -n +2 | while IFS='|' read -r user current_max avg_mb traffic_rpm recommended_max allocated_mb reason; do
|
echo "$recommendations" | tail -n +2 | while IFS='|' read -r user current_max avg_mb traffic_rpm recommended_max allocated_mb reason; do
|
||||||
@@ -1733,7 +1733,7 @@ main() {
|
|||||||
r)
|
r)
|
||||||
restore_configurations
|
restore_configurations
|
||||||
;;
|
;;
|
||||||
q|Q)
|
0)
|
||||||
cecho "${GREEN}Exiting PHP Optimizer...${NC}"
|
cecho "${GREEN}Exiting PHP Optimizer...${NC}"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -2360,9 +2360,10 @@ show_post_analysis_menu() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo " 1) Go to Take Action Menu (implement recommended actions)"
|
echo " 1) Go to Take Action Menu (implement recommended actions)"
|
||||||
echo " 2) Review Individual Recommendations (detailed view)"
|
echo " 2) Review Individual Recommendations (detailed view)"
|
||||||
echo " 3) Go Back (return to main menu)"
|
|
||||||
echo ""
|
echo ""
|
||||||
read -p "Select option [1-3]: " menu_choice
|
echo -e " ${RED}0)${NC} Back"
|
||||||
|
echo ""
|
||||||
|
read -p "Select option: " menu_choice
|
||||||
|
|
||||||
case "$menu_choice" in
|
case "$menu_choice" in
|
||||||
1)
|
1)
|
||||||
@@ -2371,7 +2372,7 @@ show_post_analysis_menu() {
|
|||||||
2)
|
2)
|
||||||
show_detailed_recommendations
|
show_detailed_recommendations
|
||||||
;;
|
;;
|
||||||
3)
|
0)
|
||||||
print_info "Returning to main menu..."
|
print_info "Returning to main menu..."
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
@@ -2563,7 +2564,7 @@ show_action_menu() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo "============================================================═"
|
echo "============================================================═"
|
||||||
echo ""
|
echo ""
|
||||||
echo " 0) Go Back"
|
echo -e " ${RED}0)${NC} Back"
|
||||||
echo ""
|
echo ""
|
||||||
read -p "Select action [0-$count]: " action_choice
|
read -p "Select action [0-$count]: " action_choice
|
||||||
|
|
||||||
|
|||||||
Executable
+2922
File diff suppressed because it is too large
Load Diff
@@ -1354,7 +1354,7 @@ show_blocking_menu() {
|
|||||||
echo -e "${BOLD}Options:${NC}"
|
echo -e "${BOLD}Options:${NC}"
|
||||||
echo " 1-${#blockable_list[@]}) Block specific IP"
|
echo " 1-${#blockable_list[@]}) Block specific IP"
|
||||||
echo " a) Block ALL high-threat IPs (score >= 80)"
|
echo " a) Block ALL high-threat IPs (score >= 80)"
|
||||||
echo " 0) Cancel"
|
echo -e " ${RED}0)${NC} Back"
|
||||||
echo ""
|
echo ""
|
||||||
read -p "Select option: " choice
|
read -p "Select option: " choice
|
||||||
|
|
||||||
@@ -1453,7 +1453,8 @@ show_security_hardening_menu() {
|
|||||||
echo -e " ${BOLD}4${NC} - Configure Port Knocking (Coming soon)"
|
echo -e " ${BOLD}4${NC} - Configure Port Knocking (Coming soon)"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e " ${BOLD}a${NC} - Apply All Needed Fixes"
|
echo -e " ${BOLD}a${NC} - Apply All Needed Fixes"
|
||||||
echo -e " ${BOLD}q${NC} - Return to Monitor"
|
echo ""
|
||||||
|
echo -e " ${RED}0)${NC} Back"
|
||||||
echo ""
|
echo ""
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
read -p "Select option: " choice
|
read -p "Select option: " choice
|
||||||
@@ -1527,7 +1528,7 @@ show_security_hardening_menu() {
|
|||||||
echo ""
|
echo ""
|
||||||
read -p "Press Enter to return to monitor..."
|
read -p "Press Enter to return to monitor..."
|
||||||
;;
|
;;
|
||||||
q|Q)
|
0)
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -854,7 +854,7 @@ done
|
|||||||
|
|
||||||
# Consolidated Scanner Results Table
|
# Consolidated Scanner Results Table
|
||||||
echo "SCANNER RESULTS SUMMARY:"
|
echo "SCANNER RESULTS SUMMARY:"
|
||||||
echo "----------------------------------------"
|
echo "────────────────────────────────────────"
|
||||||
|
|
||||||
# ImunifyAV results
|
# ImunifyAV results
|
||||||
if echo "${AVAILABLE_SCANNERS[*]}" | grep -q "imunify"; then
|
if echo "${AVAILABLE_SCANNERS[*]}" | grep -q "imunify"; then
|
||||||
@@ -879,7 +879,7 @@ done
|
|||||||
printf "%-20s %s\n" "Rootkit Hunter:" "$RKH_COUNT warnings"
|
printf "%-20s %s\n" "Rootkit Hunter:" "$RKH_COUNT warnings"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "----------------------------------------"
|
echo "────────────────────────────────────────"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ -f "$INFECTED_LIST" ] && [ -s "$INFECTED_LIST" ]; then
|
if [ -f "$INFECTED_LIST" ] && [ -s "$INFECTED_LIST" ]; then
|
||||||
@@ -891,9 +891,9 @@ done
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# IP Reputation Integration: Flag IPs that uploaded malware
|
# IP Reputation Integration: Flag IPs that uploaded malware
|
||||||
echo "----------------------------------------"
|
echo "────────────────────────────────────────"
|
||||||
echo "Analyzing upload sources..."
|
echo "Analyzing upload sources..."
|
||||||
echo "----------------------------------------"
|
echo "────────────────────────────────────────"
|
||||||
|
|
||||||
# Correlate infected files with Apache logs to find uploading IPs
|
# Correlate infected files with Apache logs to find uploading IPs
|
||||||
local flagged_ips=0
|
local flagged_ips=0
|
||||||
@@ -1586,7 +1586,7 @@ show_scan_menu() {
|
|||||||
echo " 8. Install all scanners"
|
echo " 8. Install all scanners"
|
||||||
echo " 9. Scanner settings"
|
echo " 9. Scanner settings"
|
||||||
echo ""
|
echo ""
|
||||||
echo " 0. Back to main menu"
|
echo -e " ${RED}0.${NC} Back"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
read -p "Select option: " choice
|
read -p "Select option: " choice
|
||||||
|
|||||||
Reference in New Issue
Block a user