-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (51 loc) · 3.02 KB
/
Makefile
File metadata and controls
68 lines (51 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.DEFAULT_GOAL := help
.PHONY: help install test lint run demo clean
# ── Formatting helpers ────────────────────────────────────────────────────────
BOLD := $(shell tput bold 2>/dev/null)
RESET := $(shell tput sgr0 2>/dev/null)
## help: Show this help message
help:
@echo ""
@echo "$(BOLD)urlRecon — available targets$(RESET)"
@echo ""
@sed -n 's/^## //p' $(MAKEFILE_LIST) | column -t -s ':' | sed 's/^/ /'
@echo ""
# ── Setup ─────────────────────────────────────────────────────────────────────
## install: Install Python dependencies
install:
pip install -r requirements.txt
## install-dev: Install dependencies including test and lint tools
install-dev:
pip install -r requirements.txt
pip install pytest pytest-cov flake8
# ── Quality ───────────────────────────────────────────────────────────────────
## lint: Run flake8 (fatal errors only)
lint:
flake8 urlrecon/ test/ --count --select=E9,F63,F7,F82 --show-source --statistics
## lint-full: Run flake8 with style warnings
lint-full:
flake8 urlrecon/ test/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
## test: Run test suite (no network required)
test:
python3 -m pytest test/ -v --tb=short
## test-cov: Run tests with coverage report
test-cov:
python3 -m pytest test/ -v --tb=short --cov=urlrecon --cov-report=term-missing
# ── Run ───────────────────────────────────────────────────────────────────────
## run: Scan sample URLs and write reports to ./output
run:
python3 urlrecon/main.py -i samples/demo_urls.txt -o ./output -v
## run-kml: Scan sample URLs, KML output only
run-kml:
python3 urlrecon/main.py -i samples/demo_urls.txt -o ./output --format kml -v
# ── Demo ──────────────────────────────────────────────────────────────────────
## demo: Record CLI demo GIF using VHS in Docker (writes samples/urlrecondemo.gif)
demo:
docker build -f Dockerfile.demo -t urlrecon-vhs .
docker run --rm -v "$(PWD)":/vhs urlrecon-vhs demo.tape
# ── Clean ─────────────────────────────────────────────────────────────────────
## clean: Remove generated output, caches and coverage files
clean:
rm -rf output/ report/ .pytest_cache/ .coverage coverage.xml htmlcov/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -name "*.pyc" -delete