diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..90c5faf --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +.gitignore +__pycache__/ +*.pyc +*.pyo +*.egg-info/ +dist/ +build/ +.venv/ +.eggs/ +*.egg +.ruff_cache/ +.pytest_cache/ +.mypy_cache/ +config/derp.toml +data/ diff --git a/Makefile b/Makefile index 0f9580e..9897bd0 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: install dev test lint clean help build container-run container-stop container-logs up down logs +.PHONY: install dev test lint clean help build container-run container-stop container-logs update-data up down logs APP_NAME := derp VENV := .venv @@ -54,6 +54,9 @@ container-stop: ## Stop and remove container container-logs: ## Follow container logs podman logs -f $(APP_NAME) +update-data: ## Download/refresh local data files + ./scripts/update-data.sh + up: ## Start with podman-compose (build + detach) podman-compose up -d --build diff --git a/README.md b/README.md index 2cf93ac..e37fa2e 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,11 @@ make down # Stop | blacklist | blacklist | DNSBL/RBL IP reputation check | | rand | rand | Passwords, hex, UUIDs, dice rolls | | timer | timer | Countdown timers with notification | +| geoip | geoip | GeoIP city/country lookup (MaxMind mmdb) | +| asn | asn | AS number + organization lookup (MaxMind mmdb) | +| torcheck | tor | Tor exit node check (local list) | +| iprep | iprep | IP reputation (Firehol/ET blocklists) | +| cve | cve | CVE lookup + search (local NVD mirror) | | example | echo | Demo plugin | ## Writing Plugins diff --git a/TASKS.md b/TASKS.md index 4612e17..1662ea7 100644 --- a/TASKS.md +++ b/TASKS.md @@ -4,18 +4,19 @@ | Pri | Status | Task | |-----|--------|------| -| P0 | [ ] | GeoIP plugin (GeoLite2-City mmdb) | -| P0 | [ ] | ASN plugin (GeoLite2-ASN mmdb) | -| P0 | [ ] | Tor exit node check plugin | -| P0 | [ ] | IP reputation plugin (Firehol blocklists) | -| P0 | [ ] | CVE lookup plugin (NVD JSON feed) | -| P0 | [ ] | Data update script (scripts/update-data.sh) | -| P1 | [ ] | Documentation update (all docs current) | +| P0 | [x] | GeoIP plugin (GeoLite2-City mmdb) | +| P0 | [x] | ASN plugin (GeoLite2-ASN mmdb) | +| P0 | [x] | Tor exit node check plugin | +| P0 | [x] | IP reputation plugin (Firehol blocklists) | +| P0 | [x] | CVE lookup plugin (NVD JSON feed) | +| P0 | [x] | Data update script (scripts/update-data.sh) | +| P0 | [x] | Documentation update (all docs current) | ## Completed | Date | Task | |------|------| +| 2026-02-15 | Wave 3 plugins (geoip, asn, torcheck, iprep, cve) + update script | | 2026-02-15 | Admin/owner permission system (hostmask + IRCOP) | | 2026-02-15 | SASL PLAIN, rate limiting, CTCP responses | | 2026-02-15 | Wave 2 plugins (whois, portcheck, httpcheck, tlscheck, blacklist, rand, timer) | diff --git a/docs/CHEATSHEET.md b/docs/CHEATSHEET.md index 560b876..e705cb8 100644 --- a/docs/CHEATSHEET.md +++ b/docs/CHEATSHEET.md @@ -121,6 +121,28 @@ IRC operators are auto-detected via WHO. Hostmask patterns use fnmatch. !blacklist 1.2.3.4 # DNSBL reputation check ``` +## Intelligence (local databases) + +``` +!geoip 8.8.8.8 # GeoIP: city, country, coords, tz +!asn 8.8.8.8 # ASN: number + organization +!tor 1.2.3.4 # Check Tor exit node +!tor update # Download exit list +!iprep 1.2.3.4 # Firehol/ET blocklist check +!iprep update # Download blocklist feeds +!cve CVE-2024-1234 # Lookup specific CVE +!cve search apache rce # Search CVE descriptions +!cve update # Download NVD feed (slow) +!cve stats # Show index size +``` + +### Data Setup + +```bash +./scripts/update-data.sh # Update tor + iprep +MAXMIND_LICENSE_KEY=xxx ./scripts/update-data.sh # + GeoLite2 +``` + ## Random ``` diff --git a/docs/USAGE.md b/docs/USAGE.md index c749372..a915269 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -85,6 +85,11 @@ level = "info" # Logging level: debug, info, warning, error | `!timer [label]` | Set countdown timer with notification | | `!timer list` | Show active timers | | `!timer cancel