Heray-Was-Here
Server : Apache
System : Linux hybrid3195.ca.ns.planethoster.net 3.10.0-1160.119.1.el7.tuxcare.els19.x86_64 #1 SMP Mon Mar 31 17:29:00 UTC 2025 x86_64
User : alliancerealtynb ( 1004)
PHP Version : 7.4.33
Disable Function : noop
Directory :  /usr/local/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/bin/phmotd
#!/bin/bash

if [ $LOGNAME == "root" ];
then
	#: Check if /home is is greater than /
	if [ `df  /home/ | grep dev | awk {'print $4'}` -gt `df  / | grep dev | awk {'print $4'}` ];
	then
		diskused=`df -h /home | grep dev | awk {'print $3'}`
		diskfree=`df -h /home | grep dev | awk {'print $2'}`
		pourcent=`df -h /home | grep dev | awk {'print $5'} | sed s/%//g`
	else
		diskused=`df -h / | grep dev | awk {'print $3'}`
		diskfree=`df -h / | grep dev | awk {'print $2'}`
		pourcent=`df -h / | grep dev | awk {'print $5'} | sed s/%//g`
	fi

	if [ $pourcent -ge 90 ]; then
		diskcolor="\033[0;31m"
	else
		diskcolor="\033[1;32m"
	fi

echo -e "\033[1;32m         _____  _                  _   _    _           _
        |  __ \| |                | | | |  | |         | |
        | |__) | | __ _ _ __   ___| |_| |__| | ___  ___| |_ ___ _ __
        |  ___/| |/ _  |  _ \ / _ \ __|  __  |/ _ \/ __| __/ _ \  __|
        | |    | | (_| | | | |  __/ |_| |  | | (_) \__ \ ||  __/ |
        |_|    |_|\__|_|_| |_|\___|\__|_|  |_|\___/|___/\__\___|_|   \033[0m

        #############################################################
        #  ALERT! You are entering a secured/restricted area!       #
        #  Your IP, login informations and activities are recorded  #
        #  and sent to system administrator !                       #
        #  Unauthorized access will be fully investigated and       #
        #  reported to the law agencies.                            #
        #############################################################

        \033[1;37m----------------- Perte de votre INFOGERANCE ----------------\033[0m
Toute modification en tant que ROOT alterant le bon fonctionnement
de votre serveur vous fera perdre votre INFOGERANCE !
En savoir plus: \033[1;32mhttps://www.planethoster.com/Go-Infogerance\033[0m
Contactez-nous avant toute operation ici!

        \033[1;37m------------------ Loss of your INFOGERANCE -----------------\033[0m
Any changes as ROOT altering the efficiency of your server will
result in the loss of your INFOGERANCE !
Read more: \033[1;32mhttps://www.planethoster.com/Go-Infogerance\033[0m
Contact us before any operation here !


 \033[4;37m\033[1;37m_________________\033[4;37m\033[1;37mInformations systeme | System informations____________\033[0m\033[0m
\033[1;37m|\033[0m \033[0;37mHostname               = \033[1;32m`hostname`\033[0m
\033[1;37m|\033[0m \033[0;37mMemoire \ Memory       = \033[1;32m`cat /proc/meminfo | grep MemTotal | awk {'print $2'}` kB\033[0m
\033[1;37m|\033[0m \033[0;37mDisque \ Disk          =$diskcolor $diskused / $diskfree > $pourcent % utilise\used \033[0m
\033[1;37m|\033[0m \033[0;37mLoad                   = \033[1;32m`cat /proc/loadavg |  awk {'print $1 " " $2 " " $3'}`\033[0m
\033[1;37m|\033[0m \033[0;37mVersion PHP Version    = \033[1;32m`php -v | grep built | awk {'print $2'}`\033[0m
\033[1;37m|\033[0m \033[0;37mServeur HTTP Server    = \033[1;32m`httpd -v | grep "Server version" | awk {'print $3'}`\033[0m
\033[1;37m|\033[0m \033[0;37mVersion MySQL Version  = \033[1;32m`mysql -V | awk {'print $5'}`\033[0m

 \033[4;37m\033[1;37m____________________Informations utilisateurs | Users infos____________\033[0m\033[0m
\033[1;37m|\033[0m \033[0;37mUtilisateur \ Username = \033[1;32m`whoami`\033[0m
\033[1;37m|\033[0m \033[0;37mConnectes \ connected  = \033[1;32m`users`\033[0m

 \033[4;37m\033[1;37m______________10 derniers acces root | 10 last root logins____________\033[0m\033[0m
\033[0m`last -10 | grep root | awk {'print $3" "$6" "$5" "$7'}`\033[0m"

else
	echo -e "Bienvenue $LOGNAME \ Welcome $LOGNAME"
fi

Hry