mirror of
https://github.com/0xMarcio/PentestPilot.git
synced 2026-02-13 05:22:54 +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
36 lines
1.1 KiB
Bash
Executable File
36 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
target=${1:-${TARGET:-}}
|
|
[[ -z "$target" ]] && { echo "Usage: $(basename "$0") <target> (or set TARGET)" >&2; exit 1; }
|
|
|
|
root=${HTB_ROOT:-$PWD}
|
|
troot="$root/targets/$target"
|
|
lootdir="$troot/loot"
|
|
scandir="$troot/scans"
|
|
notes="$troot/notes.md"
|
|
report="$troot/report_${target}_$(date +%Y%m%d_%H%M%S).md"
|
|
|
|
mkdir -p "$lootdir"
|
|
|
|
echo "[+] Generating report: $report"
|
|
{
|
|
echo "# Post-Exploitation Report - $target"
|
|
echo "\nGenerated: $(date)"
|
|
echo "\n## Summaries"
|
|
[[ -f "$lootdir/summary.txt" ]] && { echo "\n### System Summary"; sed -n '1,120p' "$lootdir/summary.txt"; }
|
|
[[ -f "$scandir/auto_recon_"*".summary.txt" ]] && { echo "\n### Recon Summary"; tail -n +1 "$scandir"/*summary.txt 2>/dev/null | sed 's/^/ /'; }
|
|
echo "\n## Loot Artifacts"
|
|
ls -lh "$lootdir" 2>/dev/null | sed 's/^/ /'
|
|
echo "\n## Scan Artifacts"
|
|
ls -1 "$scandir" 2>/dev/null | sed 's/^/ /'
|
|
echo "\n## Notes"
|
|
if [[ -f "$notes" ]]; then
|
|
sed -n '1,200p' "$notes" | sed 's/^/ /'
|
|
else
|
|
echo " (no notes.md found)"
|
|
fi
|
|
} > "$report"
|
|
|
|
echo "[+] Report saved: $report"
|