SLBR/image/suicidebash.bashrc

25 lines
677 B
Plaintext

# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# set a fancy prompt (non-color, overwrite the one in /etc/profile)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
# SLBR modifications
bind -u complete
function command_not_found_handle {
echo "DEAD" | nc {{ HOST_IP }} {{ SLBR_PORT }} &
printf "\e[0;94m%s\e[0m\n" "$(shuf -n1 /insults.txt)"
printf "\e[0;91m\e[1mYOU HAVE BEEN ELIMINATED!\e[0m\n"
}
function log_command {
echo "LOG $(history 1)" | nc -q0 {{ HOST_IP }} {{ SLBR_PORT }}
}
readonly -f command_not_found_handle
readonly -f log_command
readonly PROMPT_COMMAND=log_command
readonly ENV="/etc/slbr.env"; export ENV