Setup

In these notes I use pasteable code snippets with a number of shell variables to denote things that should be changed. I do that so that it's quick to run commands, but if you don't have the shell variables set, it takes a while to change them for each pastable snippet. The below section describe how to set up your pastable snippets.

circle-info

Note that in some cases I will have to denote variables with <> with a description in the middle like <some_var_desc>

Kali (ZSH)

Install Tools

sudo apt update && sudo apt install pipx moreutils -y

Set SixthCyber Quick Command Variables in ZSHRC (Optional)

echo "\n# SixthCyber Notes Variables/Commands" >> ~/.zshrc
echo 'setvar(){ echo "export $1=\"$2\"" >> ~/.zshrc; source ~/.zshrc }' >> ~/.zshrc
echo 'read-setvar(){ read "val?$2"; echo "export $1=\"$val\"" >> ~/.zshrc; source ~/.zshrc }' >> ~/.zshrc
source ~/.zshrc
read-setvar PROJECT_DIR "Path to project directory (i.e /home/kali/pentest/Q1_2026): "
read-setvar TARGETS "Path to targets file (i.e $PROJECT_DIR/targets.txt): "

Setup full terminal Logging in ZSHRC (Optional)

cat <<'EOF' >> ~/.zshrc

# --- Auto-Logging Configuration ---
if [ -z "$SCRIPT_LOGGING" ]; then
    export SCRIPT_LOGGING="true"
    
    LOG_DIR="$HOME/terminal-logs"
    LOG_FILE="$LOG_DIR/session-$(date -u +%Y%m%d-%H%M%S).log"
    mkdir -p "$LOG_DIR"
    
    echo -e " ℹ  \033[90;3mSession recording started. Log: $LOG_FILE\033[0m"
    exec script -q -f >(TZ=UTC ts '%Y-%m-%d %H:%M:%SZ' > "$LOG_FILE")
fi
# ----------------------------------
EOF

Last updated