mirror of
https://github.com/0xMarcio/PentestPilot.git
synced 2026-02-12 13:02:48 +00:00
- Replace all em dashes with simple hyphens across repo\n- README: real links in Docs Index, badges and headings\n- HOWTO: clickable TOC, clean headings, hyphen usage\n- TOOLKIT: clickable TOC, cleaned bullets, crosslinks and examples\n- Dashboard and pack_report strings updated to avoid em dashes\n- .zshrc comment cleaned
109 lines
3.2 KiB
Plaintext
109 lines
3.2 KiB
Plaintext
# HTB/OSCP helpers - source this from your ~/.zshrc
|
|
|
|
# Prompt (concise)
|
|
autoload -Uz colors && colors
|
|
PROMPT='%{$fg[green]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}:%{$fg[yellow]%}%1~%{$reset_color%} %# '
|
|
|
|
# Options
|
|
setopt autocd correct no_flow_control hist_ignore_all_dups share_history
|
|
HISTSIZE=10000
|
|
SAVEHIST=10000
|
|
|
|
# Paths
|
|
export HTB_ROOT=${HTB_ROOT:-$PWD}
|
|
export PATH="$HTB_ROOT/bin:$HTB_ROOT/bin/enum:$HTB_ROOT/bin/web:$HTB_ROOT/bin/shells:$HTB_ROOT/bin/transfer:$HTB_ROOT/bin/crypto:$HTB_ROOT/bin/misc:$HTB_ROOT/bin/privesc:$HTB_ROOT/bin/automation:$HTB_ROOT/bin/ai:$HTB_ROOT/bin/ad:$HTB_ROOT/bin/passwords:$HTB_ROOT/bin/windows:$HTB_ROOT/bin/dns:$HTB_ROOT/bin/scan:$HTB_ROOT/bin/tunnel:$HTB_ROOT/bin/pwn:$HTB_ROOT/bin/hashes:$PATH"
|
|
|
|
# Aliases
|
|
alias ll='ls -lah'
|
|
alias ..='cd ..'
|
|
alias gg='rg -n --hidden --smart-case'
|
|
alias pserve='python3 -m http.server 8000'
|
|
alias l='ls -la'
|
|
|
|
# Target workflow
|
|
settarget() {
|
|
if [[ -z "$1" ]]; then echo "Usage: settarget <ip_or_host>" >&2; return 1; fi
|
|
export TARGET="$1"
|
|
mkdir -p "$HTB_ROOT/targets/$TARGET"/{scans,loot,www,exploits}
|
|
cd "$HTB_ROOT/targets/$TARGET" || return
|
|
export OUTDIR="$PWD/scans"
|
|
echo "[+] TARGET=$TARGET"
|
|
echo "[+] OUTDIR=$OUTDIR"
|
|
}
|
|
|
|
# Quick wrappers (require TARGET to be set)
|
|
alias nq='nmap_quick.sh "$TARGET"'
|
|
alias nf='nmap_full.sh "$TARGET"'
|
|
alias nu='nmap_udp.sh "$TARGET"'
|
|
alias snmp='snmp_enum.sh "$TARGET"'
|
|
alias smb='smb_enum.sh "$TARGET"'
|
|
alias ar='auto_recon.sh "$TARGET"'
|
|
|
|
# Quick web helpers
|
|
alias headers='http_headers.sh'
|
|
alias methods='methods.sh'
|
|
alias webrecon='web_recon.sh "$TARGET"'
|
|
alias wideweb='wide_web_recon.sh'
|
|
alias notesinit='notes_init.sh "$TARGET"'
|
|
alias notesattach='notes_attach.sh "$TARGET"'
|
|
|
|
# AI helpers
|
|
alias aiplan='commands_planner.py'
|
|
alias aireview='review_findings.py'
|
|
alias aiweb='orchestrate_web.py'
|
|
alias agent='agent_orchestrator.py'
|
|
alias fullpipe='full_pipeline.sh'
|
|
alias dashboard='dashboard.py'
|
|
alias resumeall='resume_all.py'
|
|
alias techactions='tech_actions.py'
|
|
alias proxyon='proxy_toggle.sh on'
|
|
alias proxyoff='proxy_toggle.sh off'
|
|
alias cleanupscans='cleanup_scans.sh'
|
|
|
|
# SMB helpers
|
|
alias e4l='enum4linux_ng.sh "$TARGET"'
|
|
alias smbmapq='smbmap_quick.sh "$TARGET"'
|
|
|
|
# DNS helpers
|
|
alias subenum='subenum.sh'
|
|
|
|
# IP helpers
|
|
ipmy() {
|
|
ip -br a 2>/dev/null | awk '$2=="UP"{print $1,$3}' || ifconfig 2>/dev/null
|
|
}
|
|
|
|
# Extract various archives: x <file>
|
|
x() {
|
|
if [[ -f "$1" ]]; then
|
|
case "$1" in
|
|
*.tar.bz2) tar xjf "$1" ;;
|
|
*.tar.gz) tar xzf "$1" ;;
|
|
*.bz2) bunzip2 "$1" ;;
|
|
*.rar) unrar x "$1" ;;
|
|
*.gz) gunzip "$1" ;;
|
|
*.tar) tar xf "$1" ;;
|
|
*.tbz2) tar xjf "$1" ;;
|
|
*.tgz) tar xzf "$1" ;;
|
|
*.zip) unzip "$1" ;;
|
|
*.7z) 7z x "$1" ;;
|
|
*) echo "don't know how to extract '$1'" ;;
|
|
esac
|
|
else
|
|
echo "'$1' is not a valid file"
|
|
fi
|
|
}
|
|
|
|
# Quick notes helper (creates notes.md in target dir)
|
|
notes() {
|
|
[[ -z "${TARGET:-}" ]] && { echo "set TARGET first (settarget <ip>)" >&2; return 1; }
|
|
: > notes.md 2>/dev/null || true
|
|
${EDITOR:-vim} notes.md
|
|
}
|
|
|
|
# Convenience for proxying
|
|
export HTTP_PROXY=${HTTP_PROXY:-}
|
|
export HTTPS_PROXY=${HTTPS_PROXY:-}
|
|
|
|
# Done
|
|
echo "[+] Loaded .zshrc.htb (HTB_ROOT=$HTB_ROOT)"
|