⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
etc
/
profile.d
/
View File Name :
bash_eternal_history.sh
# Enable icrnl flag for serial devices. Without this, "enter" key presses # through the console (virsh console or LW::Provision::SerialPort) will not be # recognized. tty_dev=$(tty | awk '/\/dev\/ttyS/ {print $1}') if [[ ${tty_dev} == *tty* ]]; then stty -F ${tty_dev} icrnl set +o history trap $(sync) EXIT fi HISTTIMEFORMAT="%Y%m%d - %H:%M:%S - " alias ll='ls -al --color=auto' # LiquidWeb "ehistory" setup. This was moved to the end, because it was previously discovered things # like cPanel installation, will hard clobber /etc/bashrc. By moving this to the end, we remove these # fun variables. # LW Alias' function prm1() { local ehist_log='/usr/local/lp/logs/bash_eternal_history' [[ -w ${ehist_log} ]] || return local last_cmd=$(history 1) [[ -n ${EHIST_LAST_COMMAND} ]] && [[ ${EHIST_LAST_COMMAND} == ${last_cmd} ]] && return echo "$( mytty=$(tty | awk '{print substr($0,6)}') who | grep -P "${mytty}\s+" | awk '{print $1, $2, $5}' ) ${last_cmd}" >>${ehist_log} export EHIST_LAST_COMMAND=${last_cmd} } [[ -n $(tty | awk '/\/dev\/ttyS/ {print $1}') ]] || PROMPT_COMMAND=prm1