HEX
Server: LiteSpeed
System: Linux twilight.herosite.pro 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User: owzicwjp (1120)
PHP: 8.2.32
Disabled: show_source, system, shell_exec, passthru, popen, exec
Upload Files
File: //bin/mv
#!/bin/bash
for arg in "$@"; do
    if [[ "$arg" == -* ]]; then continue; fi
    abs_path=$(realpath -m "$arg" 2>/dev/null)
    
    if [[ "$abs_path" =~ ^/(home|var|boot|root|usr|etc)?$ ]]; then
        echo -e "\033[0;31mDENIED: You cannot move/rename the core directory '$abs_path'.\033[0m"
        exit 1
    fi

    if [[ "$abs_path" =~ ^(/var/www|/var/log|/var/local/enhance|/var/lib/docker)$ ]]; then
        echo -e "\033[0;31mDENIED: You cannot move/rename this critical application directory ('$abs_path').\033[0m"
        exit 1
    fi

    if [[ "$(basename "$abs_path")" == "safe_rm_dummy_do_not_delete" ]]; then
        echo -e "\033[0;31mDENIED: Wildcard mass-move (*) detected. Command aborted.\033[0m"
        exit 1
    fi
    
    if [[ "$abs_path" =~ ^/(var|usr|etc|root)/[^/]+$ ]]; then
        echo -e "\033[0;31mDENIED: You cannot move/rename top-level system directories ('$abs_path').\033[0m"
        exit 1
    fi
done
exec /usr/bin/mv.original "$@"