Initial commit: AI agents + infosec installer scripts for Termux
Adds two standalone setup scripts: - install-ai-agents.sh: Claude Code, Gemini CLI, GitHub Copilot CLI, Aider - install-infosec.sh: categorized pentesting/infosec tools (recon, web, network, passwords, forensics, reversing, utils) with SecLists wordlist fetch
This commit is contained in:
272
install-ai-agents.sh
Normal file
272
install-ai-agents.sh
Normal file
@@ -0,0 +1,272 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# =============================================================================
|
||||||
|
# pimp-my-termux — AI Coding Agents Installer
|
||||||
|
# Installs: Claude Code, Gemini CLI, GitHub Copilot CLI, Aider
|
||||||
|
#
|
||||||
|
# Usage (in Termux):
|
||||||
|
# bash install-ai-agents.sh
|
||||||
|
# bash install-ai-agents.sh --skip-update # skip pkg update (faster re-runs)
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
# --- Colors ------------------------------------------------------------------
|
||||||
|
R='\033[0;31m' G='\033[0;32m' Y='\033[1;33m'
|
||||||
|
B='\033[0;34m' C='\033[0;36m' M='\033[0;35m'
|
||||||
|
BOLD='\033[1m' DIM='\033[2m' NC='\033[0m'
|
||||||
|
|
||||||
|
# --- Helpers -----------------------------------------------------------------
|
||||||
|
info() { echo -e "${C}[·]${NC} $*"; }
|
||||||
|
success() { echo -e "${G}[✓]${NC} $*"; }
|
||||||
|
warn() { echo -e "${Y}[!]${NC} $*"; }
|
||||||
|
error() { echo -e "${R}[✗]${NC} $*"; }
|
||||||
|
header() { echo -e "\n${BOLD}${B}━━━ $* ${NC}"; }
|
||||||
|
step() { echo -e " ${DIM}→${NC} $*"; }
|
||||||
|
|
||||||
|
FAILED_TOOLS=()
|
||||||
|
SKIP_UPDATE=false
|
||||||
|
[[ "${1:-}" == "--skip-update" ]] && SKIP_UPDATE=true
|
||||||
|
|
||||||
|
# --- Banner ------------------------------------------------------------------
|
||||||
|
print_banner() {
|
||||||
|
echo -e "${M}${BOLD}"
|
||||||
|
echo " ╔═══════════════════════════════════════════╗"
|
||||||
|
echo " ║ pimp-my-termux · AI Agents ║"
|
||||||
|
echo " ║ Claude · Gemini · Copilot · Aider ║"
|
||||||
|
echo " ╚═══════════════════════════════════════════╝"
|
||||||
|
echo -e "${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Termux guard ------------------------------------------------------------
|
||||||
|
check_termux() {
|
||||||
|
if [[ -z "${PREFIX:-}" || ! -d "/data/data/com.termux" ]]; then
|
||||||
|
error "This script must run inside Termux on Android."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
success "Termux detected (PREFIX=$PREFIX)"
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Storage permission ------------------------------------------------------
|
||||||
|
setup_storage() {
|
||||||
|
if [[ ! -d "$HOME/storage" ]]; then
|
||||||
|
info "Requesting storage permission (termux-setup-storage)…"
|
||||||
|
termux-setup-storage
|
||||||
|
sleep 2
|
||||||
|
else
|
||||||
|
success "Storage already set up"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Package update ----------------------------------------------------------
|
||||||
|
update_packages() {
|
||||||
|
if $SKIP_UPDATE; then
|
||||||
|
warn "Skipping package update (--skip-update flag)"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
info "Updating package lists…"
|
||||||
|
pkg update -y && pkg upgrade -y
|
||||||
|
success "Packages up to date"
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Core dependencies -------------------------------------------------------
|
||||||
|
install_dependencies() {
|
||||||
|
header "Core Dependencies"
|
||||||
|
|
||||||
|
local deps=(nodejs-lts git python make clang binutils)
|
||||||
|
|
||||||
|
for dep in "${deps[@]}"; do
|
||||||
|
if pkg list-installed 2>/dev/null | grep -q "^${dep}/"; then
|
||||||
|
success "$dep already installed"
|
||||||
|
else
|
||||||
|
info "Installing $dep…"
|
||||||
|
if pkg install -y "$dep"; then
|
||||||
|
success "$dep installed"
|
||||||
|
else
|
||||||
|
error "Failed to install $dep — subsequent tools may fail"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# pip upgrade
|
||||||
|
info "Upgrading pip…"
|
||||||
|
python -m pip install --upgrade pip --quiet
|
||||||
|
success "pip upgraded"
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- npm global prefix -------------------------------------------------------
|
||||||
|
configure_npm() {
|
||||||
|
header "npm Configuration"
|
||||||
|
|
||||||
|
# In Termux the default npm global prefix is already $PREFIX, which is
|
||||||
|
# writable. Only reconfigure if it looks misconfigured.
|
||||||
|
local npm_prefix
|
||||||
|
npm_prefix=$(npm config get prefix 2>/dev/null || echo "")
|
||||||
|
|
||||||
|
if [[ "$npm_prefix" == "$PREFIX" ]]; then
|
||||||
|
success "npm prefix already correct ($PREFIX)"
|
||||||
|
else
|
||||||
|
info "Setting npm prefix to \$PREFIX ($PREFIX)…"
|
||||||
|
npm config set prefix "$PREFIX"
|
||||||
|
success "npm prefix set"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Confirm node/npm versions
|
||||||
|
step "node $(node --version)"
|
||||||
|
step "npm $(npm --version)"
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Install: Claude Code ----------------------------------------------------
|
||||||
|
install_claude_code() {
|
||||||
|
header "Claude Code CLI"
|
||||||
|
info "Installing @anthropic-ai/claude-code…"
|
||||||
|
|
||||||
|
if npm install -g @anthropic-ai/claude-code; then
|
||||||
|
success "Claude Code installed → $(claude --version 2>/dev/null || echo 'run: claude --version')"
|
||||||
|
echo -e " ${DIM}API key setup: export ANTHROPIC_API_KEY='sk-ant-…'${NC}"
|
||||||
|
echo -e " ${DIM}Get a key: https://console.anthropic.com/settings/api-keys${NC}"
|
||||||
|
else
|
||||||
|
error "Claude Code installation failed"
|
||||||
|
FAILED_TOOLS+=("claude-code")
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Install: Gemini CLI ------------------------------------------------------
|
||||||
|
install_gemini_cli() {
|
||||||
|
header "Gemini CLI"
|
||||||
|
info "Installing @google/gemini-cli…"
|
||||||
|
|
||||||
|
if npm install -g @google/gemini-cli; then
|
||||||
|
success "Gemini CLI installed → $(gemini --version 2>/dev/null || echo 'run: gemini --version')"
|
||||||
|
echo -e " ${DIM}API key setup: export GEMINI_API_KEY='AIza…'${NC}"
|
||||||
|
echo -e " ${DIM}Get a key: https://aistudio.google.com/app/apikey${NC}"
|
||||||
|
else
|
||||||
|
error "Gemini CLI installation failed"
|
||||||
|
FAILED_TOOLS+=("gemini-cli")
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Install: GitHub Copilot CLI ---------------------------------------------
|
||||||
|
install_copilot_cli() {
|
||||||
|
header "GitHub Copilot CLI"
|
||||||
|
info "Installing @githubnext/github-copilot-cli…"
|
||||||
|
|
||||||
|
if npm install -g @githubnext/github-copilot-cli; then
|
||||||
|
success "GitHub Copilot CLI installed"
|
||||||
|
echo -e " ${DIM}Authenticate: github-copilot-cli auth${NC}"
|
||||||
|
echo -e " ${DIM}Requires: GitHub account with Copilot subscription${NC}"
|
||||||
|
echo -e " ${DIM}Aliases added after auth: ?? (shell) git? (git) gh? (gh)${NC}"
|
||||||
|
else
|
||||||
|
error "GitHub Copilot CLI installation failed"
|
||||||
|
FAILED_TOOLS+=("copilot-cli")
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Install: Aider (replaces Cursor CLI) ------------------------------------
|
||||||
|
install_aider() {
|
||||||
|
header "Aider (AI Pair Programmer)"
|
||||||
|
echo -e " ${Y}Note about Cursor:${NC} Cursor is a desktop IDE (Electron app) with no"
|
||||||
|
echo -e " terminal CLI and cannot run on Android/Termux."
|
||||||
|
echo -e " ${G}Aider${NC} fills that role: it's an open-source AI coding agent that"
|
||||||
|
echo -e " works in your terminal, supports Claude/Gemini/GPT-4 and edits real"
|
||||||
|
echo -e " files with git integration — more powerful for headless use.\n"
|
||||||
|
|
||||||
|
info "Installing aider-chat via pip…"
|
||||||
|
|
||||||
|
# Use pipx if available for cleaner isolation, else pip directly
|
||||||
|
if command -v pipx &>/dev/null; then
|
||||||
|
if pipx install aider-chat; then
|
||||||
|
success "Aider installed via pipx"
|
||||||
|
else
|
||||||
|
warn "pipx install failed, retrying with pip…"
|
||||||
|
pip install --upgrade aider-chat
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if pip install --upgrade aider-chat; then
|
||||||
|
success "Aider installed via pip"
|
||||||
|
else
|
||||||
|
error "Aider installation failed"
|
||||||
|
FAILED_TOOLS+=("aider")
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
local aider_ver
|
||||||
|
aider_ver=$(aider --version 2>/dev/null || echo "unknown")
|
||||||
|
success "Aider $aider_ver → run: aider --help"
|
||||||
|
echo -e " ${DIM}With Claude: aider --model claude-sonnet-4-6${NC}"
|
||||||
|
echo -e " ${DIM}With Gemini: aider --model gemini/gemini-2.5-pro${NC}"
|
||||||
|
echo -e " ${DIM}With GPT-4: aider --model gpt-4o${NC}"
|
||||||
|
echo -e " ${DIM}Docs: https://aider.chat${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Shell environment hints -------------------------------------------------
|
||||||
|
print_env_hints() {
|
||||||
|
header "Environment Setup"
|
||||||
|
echo -e " Add these exports to ${BOLD}~/.bashrc${NC} (or ~/.zshrc):\n"
|
||||||
|
|
||||||
|
cat << 'ENVBLOCK'
|
||||||
|
# ── AI Coding Agents ──────────────────────────────────────────────
|
||||||
|
export ANTHROPIC_API_KEY="sk-ant-YOUR_KEY_HERE"
|
||||||
|
export GEMINI_API_KEY="AIzaYOUR_KEY_HERE"
|
||||||
|
export OPENAI_API_KEY="sk-YOUR_KEY_HERE" # optional, for aider/GPT
|
||||||
|
|
||||||
|
# Copilot CLI shell aliases (run once: github-copilot-cli auth)
|
||||||
|
eval "$(github-copilot-cli alias -- "$0")" # adds ?? git? gh? shortcuts
|
||||||
|
ENVBLOCK
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
info "Apply immediately with: source ~/.bashrc"
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Summary -----------------------------------------------------------------
|
||||||
|
print_summary() {
|
||||||
|
header "Installation Summary"
|
||||||
|
|
||||||
|
local all_tools=("claude (claude-code)" "gemini (gemini-cli)" "github-copilot-cli" "aider")
|
||||||
|
|
||||||
|
for tool in "${all_tools[@]}"; do
|
||||||
|
local bin
|
||||||
|
bin=$(echo "$tool" | awk '{print $1}')
|
||||||
|
if command -v "$bin" &>/dev/null; then
|
||||||
|
success "$tool"
|
||||||
|
else
|
||||||
|
# check if it was in our failed list
|
||||||
|
local label
|
||||||
|
label=$(echo "$tool" | sed 's/[()]//g')
|
||||||
|
warn "$tool — not found in PATH (may need to reopen Termux)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ ${#FAILED_TOOLS[@]} -gt 0 ]]; then
|
||||||
|
echo ""
|
||||||
|
error "The following installations encountered errors:"
|
||||||
|
for t in "${FAILED_TOOLS[@]}"; do
|
||||||
|
echo -e " ${R}•${NC} $t"
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
warn "Try re-running: bash install-ai-agents.sh --skip-update"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo -e " ${G}${BOLD}All tools installed successfully!${NC}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo -e " ${DIM}Reopen Termux or run 'source ~/.bashrc' to refresh PATH.${NC}"
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Main --------------------------------------------------------------------
|
||||||
|
main() {
|
||||||
|
print_banner
|
||||||
|
check_termux
|
||||||
|
setup_storage
|
||||||
|
update_packages
|
||||||
|
install_dependencies
|
||||||
|
configure_npm
|
||||||
|
install_claude_code
|
||||||
|
install_gemini_cli
|
||||||
|
install_copilot_cli
|
||||||
|
install_aider
|
||||||
|
print_env_hints
|
||||||
|
print_summary
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
389
install-infosec.sh
Normal file
389
install-infosec.sh
Normal file
@@ -0,0 +1,389 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# =============================================================================
|
||||||
|
# pimp-my-termux — Infosec / Pentesting Tools Installer
|
||||||
|
# For security researchers on Termux/Android
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# bash install-infosec.sh
|
||||||
|
# bash install-infosec.sh --skip-update
|
||||||
|
# bash install-infosec.sh --category recon # install one category only
|
||||||
|
#
|
||||||
|
# Categories: recon | web | network | passwords | forensics | reversing | utils
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
# --- Colors ------------------------------------------------------------------
|
||||||
|
R='\033[0;31m' G='\033[0;32m' Y='\033[1;33m'
|
||||||
|
B='\033[0;34m' C='\033[0;36m' M='\033[0;35m'
|
||||||
|
BOLD='\033[1m' DIM='\033[2m' NC='\033[0m'
|
||||||
|
|
||||||
|
info() { echo -e "${C}[·]${NC} $*"; }
|
||||||
|
success() { echo -e "${G}[✓]${NC} $*"; }
|
||||||
|
warn() { echo -e "${Y}[!]${NC} $*"; }
|
||||||
|
error() { echo -e "${R}[✗]${NC} $*"; }
|
||||||
|
header() { echo -e "\n${BOLD}${B}━━━ $* ${NC}"; }
|
||||||
|
note() { echo -e " ${DIM}$*${NC}"; }
|
||||||
|
skip() { echo -e " ${DIM}[–] $* (already installed)${NC}"; }
|
||||||
|
|
||||||
|
FAILED=()
|
||||||
|
SKIP_UPDATE=false
|
||||||
|
ONLY_CATEGORY=""
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
[[ "$arg" == "--skip-update" ]] && SKIP_UPDATE=true
|
||||||
|
[[ "$arg" == "--category" ]] && shift && ONLY_CATEGORY="$1"
|
||||||
|
done
|
||||||
|
|
||||||
|
# --- Termux guard ------------------------------------------------------------
|
||||||
|
[[ -z "${PREFIX:-}" || ! -d "/data/data/com.termux" ]] && {
|
||||||
|
error "Must be run inside Termux on Android."; exit 1; }
|
||||||
|
|
||||||
|
# --- Banner ------------------------------------------------------------------
|
||||||
|
echo -e "${R}${BOLD}"
|
||||||
|
echo " ╔═════════════════════════════════════════════╗"
|
||||||
|
echo " ║ pimp-my-termux · Infosec Edition ║"
|
||||||
|
echo " ║ Recon · Web · Network · Pwn · Forensics ║"
|
||||||
|
echo " ╚═════════════════════════════════════════════╝"
|
||||||
|
echo -e "${NC}"
|
||||||
|
echo -e " ${DIM}For authorized security research and CTF use only.${NC}\n"
|
||||||
|
|
||||||
|
# --- Helpers -----------------------------------------------------------------
|
||||||
|
run_category() {
|
||||||
|
local cat="$1"
|
||||||
|
[[ -n "$ONLY_CATEGORY" && "$ONLY_CATEGORY" != "$cat" ]] && return
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_install() {
|
||||||
|
# Install a pkg package; skip gracefully if already present
|
||||||
|
local pkg="$1"
|
||||||
|
local label="${2:-$pkg}"
|
||||||
|
if pkg list-installed 2>/dev/null | grep -q "^${pkg}/"; then
|
||||||
|
skip "$label"
|
||||||
|
else
|
||||||
|
info "Installing $label…"
|
||||||
|
if pkg install -y "$pkg" 2>/dev/null; then
|
||||||
|
success "$label"
|
||||||
|
else
|
||||||
|
error "$label — pkg install failed"
|
||||||
|
FAILED+=("$label")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pip_install() {
|
||||||
|
local pkg="$1"
|
||||||
|
local label="${2:-$pkg}"
|
||||||
|
info "pip: $label…"
|
||||||
|
if python -m pip install --upgrade --quiet "$pkg"; then
|
||||||
|
success "$label"
|
||||||
|
else
|
||||||
|
error "$label — pip install failed"
|
||||||
|
FAILED+=("$label")
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
go_install() {
|
||||||
|
local module="$1"
|
||||||
|
local binary="$2"
|
||||||
|
local label="${3:-$binary}"
|
||||||
|
if command -v "$binary" &>/dev/null; then
|
||||||
|
skip "$label"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
info "go install: $label…"
|
||||||
|
if go install "$module" 2>/dev/null; then
|
||||||
|
success "$label"
|
||||||
|
else
|
||||||
|
error "$label — go install failed"
|
||||||
|
FAILED+=("$label")
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Update ------------------------------------------------------------------
|
||||||
|
if ! $SKIP_UPDATE; then
|
||||||
|
header "Package Update"
|
||||||
|
pkg update -y && pkg upgrade -y
|
||||||
|
success "Packages up to date"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# --- Base dependencies -------------------------------------------------------
|
||||||
|
header "Base Dependencies"
|
||||||
|
pkg_install python "Python 3"
|
||||||
|
pkg_install golang "Go (for Go-based tools)"
|
||||||
|
pkg_install git "git"
|
||||||
|
pkg_install curl "curl"
|
||||||
|
pkg_install wget "wget"
|
||||||
|
pkg_install openssl-tool "openssl"
|
||||||
|
pkg_install libssl "libssl"
|
||||||
|
|
||||||
|
python -m pip install --upgrade pip --quiet
|
||||||
|
success "pip up to date"
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# CATEGORY 1 — RECONNAISSANCE
|
||||||
|
# =============================================================================
|
||||||
|
if run_category recon; then
|
||||||
|
header "Reconnaissance"
|
||||||
|
|
||||||
|
pkg_install nmap "nmap (port scanner)"
|
||||||
|
pkg_install whois "whois"
|
||||||
|
pkg_install dnsutils "dig / nslookup"
|
||||||
|
pkg_install traceroute "traceroute"
|
||||||
|
pkg_install mtr "mtr (traceroute + ping)"
|
||||||
|
pkg_install masscan "masscan (fast port scanner)"
|
||||||
|
|
||||||
|
# theHarvester — OSINT / email & subdomain harvester
|
||||||
|
pip_install theHarvester "theHarvester (OSINT harvester)"
|
||||||
|
|
||||||
|
# Shodan CLI
|
||||||
|
pip_install shodan "shodan-cli"
|
||||||
|
note "shodan init <YOUR_API_KEY> → https://account.shodan.io"
|
||||||
|
|
||||||
|
# subfinder — subdomain discovery (Go)
|
||||||
|
go_install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest \
|
||||||
|
subfinder "subfinder (subdomain enum)"
|
||||||
|
|
||||||
|
# httpx — fast HTTP prober (Go)
|
||||||
|
go_install github.com/projectdiscovery/httpx/cmd/httpx@latest \
|
||||||
|
httpx "httpx (HTTP prober)"
|
||||||
|
|
||||||
|
# dnsx — DNS toolkit (Go)
|
||||||
|
go_install github.com/projectdiscovery/dnsx/cmd/dnsx@latest \
|
||||||
|
dnsx "dnsx (DNS recon)"
|
||||||
|
|
||||||
|
# amass — in-depth attack surface mapper (Go)
|
||||||
|
go_install github.com/owasp-amass/amass/v4/...@master \
|
||||||
|
amass "amass (attack surface mapper)"
|
||||||
|
|
||||||
|
fi # recon
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# CATEGORY 2 — WEB TESTING
|
||||||
|
# =============================================================================
|
||||||
|
if run_category web; then
|
||||||
|
header "Web Testing"
|
||||||
|
|
||||||
|
pkg_install nikto "nikto (web vuln scanner)"
|
||||||
|
pkg_install sqlmap "sqlmap (SQL injection)"
|
||||||
|
|
||||||
|
# httpie — user-friendly curl alternative
|
||||||
|
pip_install httpie "httpie (http client)"
|
||||||
|
|
||||||
|
# ffuf — web fuzzer (Go)
|
||||||
|
go_install github.com/ffuf/ffuf/v2@latest \
|
||||||
|
ffuf "ffuf (web fuzzer)"
|
||||||
|
|
||||||
|
# gobuster — dir/subdomain brute force (Go)
|
||||||
|
go_install github.com/OJ/gobuster/v3@latest \
|
||||||
|
gobuster "gobuster (dir/sub brute force)"
|
||||||
|
|
||||||
|
# nuclei — template-based vulnerability scanner (Go)
|
||||||
|
go_install github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest \
|
||||||
|
nuclei "nuclei (vuln scanner)"
|
||||||
|
note "nuclei -update-templates ← run after install"
|
||||||
|
|
||||||
|
# wfuzz — web fuzzer (Python)
|
||||||
|
pip_install wfuzz "wfuzz (web fuzzer)"
|
||||||
|
|
||||||
|
# jwt-tool — JWT attack toolkit
|
||||||
|
pip_install jwt_tool "jwt-tool (JWT attacks)"
|
||||||
|
|
||||||
|
fi # web
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# CATEGORY 3 — NETWORK
|
||||||
|
# =============================================================================
|
||||||
|
if run_category network; then
|
||||||
|
header "Network Tools"
|
||||||
|
|
||||||
|
pkg_install netcat-openbsd "netcat (nc)"
|
||||||
|
pkg_install ncat "ncat (nmap's netcat)"
|
||||||
|
pkg_install socat "socat (relay / reverse shells)"
|
||||||
|
pkg_install tcpdump "tcpdump"
|
||||||
|
pkg_install tshark "tshark (Wireshark CLI)"
|
||||||
|
pkg_install iproute2 "ip / ss commands"
|
||||||
|
pkg_install bind-utils "host / dig"
|
||||||
|
pkg_install openssh "ssh / scp / sftp"
|
||||||
|
|
||||||
|
# impacket — Windows/SMB protocol suite (Python)
|
||||||
|
pip_install impacket "impacket (SMB/AD tools)"
|
||||||
|
|
||||||
|
# scapy — packet crafting (Python)
|
||||||
|
pip_install scapy "scapy (packet crafting)"
|
||||||
|
|
||||||
|
warn "tcpdump / tshark require root for live capture on Android."
|
||||||
|
warn "Use them with pcap files (offline analysis) without root."
|
||||||
|
|
||||||
|
fi # network
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# CATEGORY 4 — PASSWORDS & AUTH
|
||||||
|
# =============================================================================
|
||||||
|
if run_category passwords; then
|
||||||
|
header "Passwords & Authentication"
|
||||||
|
|
||||||
|
pkg_install hydra "hydra (network brute force)"
|
||||||
|
pkg_install john "john (John the Ripper)"
|
||||||
|
pkg_install hashcat "hashcat (GPU hash cracker)"
|
||||||
|
pkg_install medusa "medusa (parallel brute force)"
|
||||||
|
|
||||||
|
# CrackMapExec / netexec (Python)
|
||||||
|
pip_install netexec "netexec / CrackMapExec"
|
||||||
|
|
||||||
|
warn "hashcat GPU mode is limited on Android; CPU mode (-D 1) works fine."
|
||||||
|
note "Common wordlists can be fetched with:"
|
||||||
|
note " wget https://github.com/danielmiessler/SecLists/raw/master/Passwords/Common-Credentials/10-million-password-list-top-1000.txt"
|
||||||
|
|
||||||
|
fi # passwords
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# CATEGORY 5 — FORENSICS
|
||||||
|
# =============================================================================
|
||||||
|
if run_category forensics; then
|
||||||
|
header "Forensics"
|
||||||
|
|
||||||
|
pkg_install binwalk "binwalk (firmware analysis)"
|
||||||
|
pkg_install exiftool "exiftool (metadata)"
|
||||||
|
pkg_install steghide "steghide (steganography)"
|
||||||
|
pkg_install foremost "foremost (file carving)"
|
||||||
|
pkg_install sleuthkit "sleuthkit / fls / fsstat"
|
||||||
|
pkg_install hexedit "hexedit"
|
||||||
|
pkg_install xxd "xxd (hex dump)"
|
||||||
|
|
||||||
|
# volatility3 — memory forensics (Python)
|
||||||
|
pip_install volatility3 "volatility3 (memory forensics)"
|
||||||
|
|
||||||
|
# oletools — Office/OLE malware analysis (Python)
|
||||||
|
pip_install oletools "oletools (Office/OLE analysis)"
|
||||||
|
|
||||||
|
# pdfminer — PDF analysis
|
||||||
|
pip_install pdfminer.six "pdfminer (PDF parser)"
|
||||||
|
|
||||||
|
# python-magic — file type detection
|
||||||
|
pip_install python-magic "python-magic (file ID)"
|
||||||
|
|
||||||
|
fi # forensics
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# CATEGORY 6 — REVERSING & EXPLOITATION
|
||||||
|
# =============================================================================
|
||||||
|
if run_category reversing; then
|
||||||
|
header "Reversing & Exploitation"
|
||||||
|
|
||||||
|
pkg_install gdb "gdb (debugger)"
|
||||||
|
pkg_install radare2 "radare2 (r2 framework)"
|
||||||
|
pkg_install ltrace "ltrace (library call tracer)"
|
||||||
|
pkg_install strace "strace (syscall tracer)"
|
||||||
|
pkg_install nasm "nasm (assembler)"
|
||||||
|
pkg_install binutils "binutils (objdump, nm, strings…)"
|
||||||
|
|
||||||
|
# pwntools — CTF/exploit dev (Python)
|
||||||
|
pip_install pwntools "pwntools (exploit dev)"
|
||||||
|
|
||||||
|
# ROPgadget
|
||||||
|
pip_install ROPgadget "ROPgadget (ROP chain builder)"
|
||||||
|
|
||||||
|
# angr — binary analysis framework (heavy)
|
||||||
|
pip_install angr "angr (binary analysis)"
|
||||||
|
|
||||||
|
note "angr is large (~500 MB). Skip if disk space is limited."
|
||||||
|
|
||||||
|
fi # reversing
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# CATEGORY 7 — UTILITIES
|
||||||
|
# =============================================================================
|
||||||
|
if run_category utils; then
|
||||||
|
header "General Utilities"
|
||||||
|
|
||||||
|
pkg_install jq "jq (JSON processor)"
|
||||||
|
pkg_install tmux "tmux (terminal multiplexer)"
|
||||||
|
pkg_install vim "vim"
|
||||||
|
pkg_install zsh "zsh"
|
||||||
|
pkg_install fzf "fzf (fuzzy finder)"
|
||||||
|
pkg_install bat "bat (cat with syntax highlighting)"
|
||||||
|
pkg_install lsd "lsd (ls with icons)"
|
||||||
|
pkg_install ripgrep "ripgrep (fast grep)"
|
||||||
|
pkg_install fd "fd (fast find)"
|
||||||
|
pkg_install tree "tree"
|
||||||
|
pkg_install zip "zip / unzip"
|
||||||
|
pkg_install p7zip "7zip"
|
||||||
|
pkg_install termux-api "termux-api (Android integration)"
|
||||||
|
|
||||||
|
# CyberChef CLI alternative — python cyberchef
|
||||||
|
pip_install pycipher "pycipher (classical ciphers)"
|
||||||
|
pip_install pycryptodome "pycryptodome (crypto library)"
|
||||||
|
|
||||||
|
fi # utils
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# WORDLISTS
|
||||||
|
# =============================================================================
|
||||||
|
header "Wordlists"
|
||||||
|
|
||||||
|
WORDLISTS_DIR="$HOME/wordlists"
|
||||||
|
mkdir -p "$WORDLISTS_DIR"
|
||||||
|
|
||||||
|
info "Cloning SecLists (this may take a while — ~1.3 GB)…"
|
||||||
|
if [[ -d "$WORDLISTS_DIR/SecLists/.git" ]]; then
|
||||||
|
skip "SecLists (already cloned)"
|
||||||
|
else
|
||||||
|
if git clone --depth 1 https://github.com/danielmiessler/SecLists.git \
|
||||||
|
"$WORDLISTS_DIR/SecLists"; then
|
||||||
|
success "SecLists → $WORDLISTS_DIR/SecLists"
|
||||||
|
else
|
||||||
|
warn "SecLists clone failed (network issue or low storage)"
|
||||||
|
FAILED+=("SecLists")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
note "For a smaller download use --depth 1 and only the subdirs you need."
|
||||||
|
note "rockyou.txt is inside SecLists/Passwords/Leaked-Databases/"
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# ROOT-LIMITED TOOLS NOTE
|
||||||
|
# =============================================================================
|
||||||
|
header "Root-Limited Tools"
|
||||||
|
echo -e " The following tools ${Y}work better (or only) with root${NC}:
|
||||||
|
|
||||||
|
${DIM}•${NC} tcpdump / tshark — live packet capture needs CAP_NET_RAW
|
||||||
|
${DIM}•${NC} aircrack-ng — needs monitor mode wifi (rare on Android)
|
||||||
|
${DIM}•${NC} hashcat — GPU acceleration (OpenCL) not available on Termux
|
||||||
|
${DIM}•${NC} arp-scan — raw socket ARP requires root
|
||||||
|
|
||||||
|
${G}Tip:${NC} If you have a rooted device, install ${BOLD}tsu${NC} for sudo-like access:
|
||||||
|
${DIM}pkg install tsu && tsu${NC}
|
||||||
|
"
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# SUMMARY
|
||||||
|
# =============================================================================
|
||||||
|
header "Summary"
|
||||||
|
|
||||||
|
TOOLS=(nmap masscan nikto sqlmap hydra john hashcat
|
||||||
|
gobuster ffuf nuclei subfinder httpx
|
||||||
|
netcat socat tshark gdb radare2
|
||||||
|
binwalk exiftool steghide)
|
||||||
|
|
||||||
|
for t in "${TOOLS[@]}"; do
|
||||||
|
if command -v "$t" &>/dev/null; then
|
||||||
|
success "$t"
|
||||||
|
else
|
||||||
|
warn "$t — not in PATH yet (reopen Termux)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ ${#FAILED[@]} -gt 0 ]]; then
|
||||||
|
echo ""
|
||||||
|
error "Failed installs:"
|
||||||
|
for f in "${FAILED[@]}"; do
|
||||||
|
echo -e " ${R}•${NC} $f"
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
warn "Re-run with --skip-update, or install individually:"
|
||||||
|
warn " pkg install <tool> OR pip install <tool>"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo -e " ${G}${BOLD}Done.${NC} Reopen Termux or run: ${BOLD}source ~/.bashrc${NC}"
|
||||||
|
echo -e " ${DIM}Wordlists: ~/wordlists/SecLists/${NC}"
|
||||||
|
echo ""
|
||||||
Reference in New Issue
Block a user