# ffuf-automation — Quick Command Reference

## ─── DOCKER SETUP ────────────────────────────────────────────

### Build image (first time only)
```bash
docker build -t ffuf-automation:latest .
```

### Rebuild from scratch (force)
```bash
docker build -t ffuf-automation:latest . --no-cache
```

---

## ─── RUN COMMANDS ────────────────────────────────────────────

### Quickest way (run.sh)
```bash
chmod +x run.sh
./run.sh --domains domains.txt \
         --wordlist /app/wordlists/Discovery/Web-Content/common.txt \
         --output results
```

### Basic scan
```bash
docker run --rm -it \
  -v $(pwd)/domains.txt:/app/domains.txt:ro \
  -v $(pwd)/results:/app/results \
  ffuf-automation:latest \
  --domains domains.txt \
  --wordlist /app/wordlists/Discovery/Web-Content/common.txt \
  --output results
```

### Full scan with all options
```bash
docker run --rm -it \
  -v $(pwd)/domains.txt:/app/domains.txt:ro \
  -v $(pwd)/results:/app/results \
  ffuf-automation:latest \
  --domains domains.txt \
  --wordlist /app/wordlists/Discovery/Web-Content/directory-list-2.3-small.txt \
  --depth 2 \
  --extensions .php,.txt,.bak,.json,.asp,.aspx,.js \
  --match-codes 200,204,301,302,401,403 \
  --filter-codes 404 \
  --filter-words 10 \
  --threads 50 \
  --timeout 10 \
  --rate 100 \
  --delay 2 \
  --output results
```

### With scope file
```bash
docker run --rm -it \
  -v $(pwd)/domains.txt:/app/domains.txt:ro \
  -v $(pwd)/scope.txt:/app/scope.txt:ro \
  -v $(pwd)/results:/app/results \
  ffuf-automation:latest \
  --domains domains.txt \
  --scope scope.txt \
  --wordlist /app/wordlists/Discovery/Web-Content/common.txt \
  --output results
```

### With custom wordlist from local folder
```bash
docker run --rm -it \
  -v $(pwd)/domains.txt:/app/domains.txt:ro \
  -v $(pwd)/results:/app/results \
  -v $(pwd)/wordlists:/app/custom-wordlists:ro \
  ffuf-automation:latest \
  --domains domains.txt \
  --wordlist /app/custom-wordlists/my-list.txt \
  --output results
```

### Using docker-compose
```bash
docker compose run ffuf-auto \
  --domains domains.txt \
  --wordlist /app/wordlists/Discovery/Web-Content/common.txt \
  --output results
```

---

## ─── BUILT-IN WORDLISTS (inside container) ──────────────────

| Path | Size | Best For |
|------|------|----------|
| `/app/wordlists/Discovery/Web-Content/common.txt` | Small | Quick test |
| `/app/wordlists/Discovery/Web-Content/directory-list-2.3-small.txt` | Medium | Standard scan |
| `/app/wordlists/Discovery/Web-Content/directory-list-2.3-medium.txt` | Large | Deep scan |
| `/app/wordlists/Discovery/Web-Content/raft-medium-directories.txt` | Medium | Broad coverage |

---

## ─── VIEW RESULTS ────────────────────────────────────────────

```bash
# List all reports
ls results/reports/

# Open HTML report in browser
xdg-open results/reports/report_*.html     # Linux
open results/reports/report_*.html         # macOS

# View CSV
cat results/reports/report_*.csv

# View raw ffuf output per domain
ls results/raw/
cat results/raw/example.com.json | python3 -m json.tool
```

---

## ─── DOCKER MANAGEMENT ───────────────────────────────────────

```bash
# List images
docker images | grep ffuf

# Remove image (to rebuild clean)
docker rmi ffuf-automation:latest

# See running containers
docker ps

# Enter container shell (for debugging)
docker run --rm -it \
  -v $(pwd)/domains.txt:/app/domains.txt:ro \
  -v $(pwd)/results:/app/results \
  --entrypoint /bin/bash \
  ffuf-automation:latest
```
