Shows only the changed parts of the latest report: text diffs with
ANSI colors (+green/-red/@cyan), new/missing URLs, link diffs,
hidden content, meta-refresh and inline script findings.
Colors are suppressed when stdout is not a terminal (pipes, log files).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bredelar.info/ and jamulix.de/ contain local credentials and crawl data
that must not be version-controlled. Files are kept on disk.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add `test-alert [--level yellow|red]` to verify SMTP without a real scan
- Enable email alerting in bredelar.info/config.yaml (uses DEFAULT_CONFIG
for host/user/from/to, only smtp_password_env kept explicit)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reads robots.txt Sitemap directive and fetches sitemap.xml / sitemap_index.xml
before crawling. All listed URLs are added to the crawl queue so pages
without any inbound links are still scanned. Configurable via crawl.sitemap.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Uses \r to overwrite the same terminal line — no scrolling.
Crawler exposes on_progress callback; checker.check_external_links
gets an optional on_progress parameter.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- python -m scanner https://domain.de scan (URL as first positional arg)
- On first use, the domain directory is auto-created from the
meine-seite.de template with all paths and target URL substituted
- scanner.sh wrapper script for convenient ./scanner.sh usage
- --config syntax fully preserved (cron jobs unchanged)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the placeholder domain example.com with meine-seite.de
throughout the template directory and config. Tests and scanner defaults
retain example.com as a generic RFC 2606 placeholder.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Heavily commented config.yaml and config/ directory serve as a
copy-paste starting point for any new site to monitor.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both README.md and BEDIENUNGSANLEITUNG.md now show the correct
cron entries using --config <site>/config.yaml, one entry per site
with staggered start times (03:00 / 03:15).
Added "Neue Website hinzufügen" step-by-step guide and updated
log-rotation path to */logs/*.log (covers all sites).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each monitored website now lives in its own named subdirectory
(bredelar.info/, jamulix.de/) with a dedicated config.yaml using
absolute paths. This makes adding new sites trivial:
mkdir newsite.de && cp bredelar.info/config.yaml newsite.de/
# adjust target + paths, then: python -m scanner --config newsite.de/config.yaml init
Changes:
- bredelar.info/: moved data/, reports/, logs/, config/ from project root
- bredelar.info/config.yaml: new, with absolute paths
- jamulix.de/: moved from ~/Python_Programs/jamulix_check/
- jamulix.de/config.yaml: updated paths to new location
- .gitignore: replaced old data/*/reports/logs entries with per-site entries
- config.yaml (root): removed (replaced by site-specific configs)
- CLAUDE.md: updated CLI examples to --config <site>/config.yaml
Usage:
python -m scanner --config bredelar.info/config.yaml scan
python -m scanner --config jamulix.de/config.yaml scan
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Some servers return 403 for the scanner's bot user-agent but serve
the page normally to browsers. On a 403 response, the crawler now
retries with a browser-like UA; if the server then returns 2xx, the
page is crawled normally (HTML extracted, status recorded as 2xx).
Mirrors the same fix already applied to check_external_links.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds crawl.exclude_paths config option (list of URL path prefixes).
Matching URLs are excluded at two levels:
- Crawler: not fetched at all (saves HTTP requests)
- Differ: filtered from both baseline and current before comparison,
so legacy baseline entries under excluded paths don't appear as
"missing URLs" after the option is added retroactively
Example config:
crawl:
exclude_paths: ["/rss/", "/feed/", "/news/archiv/"]
8 new tests (176 total).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously, broken links that were part of the baseline ("known broken")
disappeared from the terminal output (score=0, no Klartext mention).
- differ.py: build reverse link index to record which pages link to
each broken URL; "pages" field added to new_broken/known_broken entries
- plain.py: klartext_befunde() now includes known_broken_urls alongside
new_broken_urls — broken links are always reported until fixed
- __main__.py: report shows "gefunden auf: <page>" for every broken entry,
known entries labelled "[bekannt, noch nicht behoben]"
- 3 new tests (169 total)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The broken_links entries already contained a pages[] list, but
_render_markdown didn't display it. Now each broken link shows up to
3 pages where it was found ("gefunden auf: …").
Also adds error_links (connection errors) to the main scan report
with the same source-page annotation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When cmd_scan triggers the weekly cloak-check, the browser-UA crawl
has already just been completed. Pass those pages directly to
_run_cloak_core() so only the Googlebot-UA crawl is needed,
reducing weekly scans from 3 full crawls to 2.
Standalone `cloak-check` command is unaffected (pages_normal=None).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Servers that block bot user-agents return 403 even for live URLs.
On a 403 response, the checker now retries with a browser-like UA;
if the server then responds with 2xx/3xx, the link is counted as OK.
This eliminates false positives from bot-blocking (e.g. bergbauspuren-bredelar.de).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ziel: ein einziger täglicher Befehl genügt, jede Meldung ist auch ohne
IT-Wissen verständlich.
Auto-Modus (ein Cron-Job genügt für alles):
- data/state.json merkt sich, wann die Wochen-Prüfungen zuletzt liefen
(baseline.py: load_state/save_state/is_check_due/mark_check_run)
- `scan` führt fällige Zusatzprüfungen (Tarnung/externe Links/Dateien)
automatisch mit aus; Gesamt-Ampel = schlechtestes Teilergebnis;
EIN kombinierter Report + EIN Alert
- neuer Config-Abschnitt periodic_checks (Default: wöchentlich, an)
Klartext (scanner/plain.py):
- Ampel 🟢/🟡/🔴 + Sätze ohne Fachbegriffe, aus den strukturierten Befunden
- Report: Klartext oben, "Technische Details (für Ihren Dienstleister)" unten
- Terminal-Ausgabe und E-Mail (alerter.py) ebenso umgestellt
Komfort:
- approve --all/--rebuild legt die Datei-Überwachung automatisch mit an
(Opt-out: --skip-assets); approve-assets bleibt für den Sonderfall
- status zeigt Ampel zuoberst + wann die Wochen-Prüfungen zuletzt liefen
- Onboarding-Text in einfacher Sprache, wenn noch kein Vergleichsstand existiert
Doku: README + BEDIENUNGSANLEITUNG mit "In 3 Schritten"-Einstieg.
Tests: test_state.py, test_plain.py (Fachbegriff-Assertion), Auto-Asset-
Baseline-Test. 165 Tests grün.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Neue Abschnitte 17–19 für Cloaking-Erkennung, externe Link-Prüfung und
Asset-Hashing. Befehlstabelle, Scoring-Tabelle, Erkennungsübersicht und
Verzeichnisstruktur aktualisiert.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Neue Befehle:
- `python -m scanner check-assets` — SHA-256-Hashes aller JS/CSS/Bild-Assets
aus dem letzten Snapshot fetchen und mit Baseline vergleichen
- `python -m scanner approve-assets` — aktuelle Hashes als neue Baseline setzen
Scoring: geändertes JS 40 Pkt, CSS 30 Pkt, Bild/PDF 20 Pkt.
Asset-Baseline liegt in data/baseline/asset_hashes.json.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Neuer Befehl `python -m scanner check-ext-links`:
- Liest alle externen <a>-Links aus dem letzten Snapshot
- Prüft jeden per HEAD-Request (Fallback auf GET bei HTTP 405)
- Meldet 4xx/5xx und Verbindungsfehler mit Quelladressen
- Report unter reports/<ts>_ext-links/
- Exit-Code 1 bei kaputten Links, 0 wenn alle erreichbar
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Neuer Befehl `python -m scanner cloak-check`:
- Crawlt die Website zweimal: einmal mit Browser-UA, einmal als Googlebot
- Vergleicht Text, Links und Response-Header (Vary: User-Agent)
- Scoring: Bot-Only-Link 60 Pkt (RED), extra Text >100 Zeichen 40 Pkt,
Vary: User-Agent ohne Inhaltsdiff 25 Pkt
- Eigener Report unter reports/<ts>_cloak/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CLAUDE.md enthält lokale Claude-Code-Anweisungen und gehört nicht ins
öffentliche Repository.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Vollständige Bedienungsanleitung für den täglichen Betrieb, Erstinbetriebnahme,
Alarm-Workflows, Cron-Setup, E-Mail-Konfiguration und Konfigurationsreferenz.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Echte Bugs:
- extractor: JSON-LD-Crash bei Nicht-Dict-Items (isinstance-Guard)
- baseline/__main__: Crawl-Fehler ins Snapshot-Manifest -> erscheinen im Report
- __main__: Whitelist-/Header-/Webshell-Checks nur noch auf status==200
- crawler: Noise-Param-Regex auf Voll-Key (view=/value= nicht mehr verworfen)
- differ/__main__: unerwartetes JSON-LD via eigenem Kanal, auch auf
unveraenderten Seiten erkannt, kein Re-Alert auf bereits genehmigte Typen
Aufgeraeumt:
- checker: check_internal_paths, find_broken_pages, canonical_is_hijacked,
check_jsonld_types entfernt (nicht verdrahtet)
- allowed_paths.yaml-Logik und tote Scoring-Keys entfernt
- tote Imports entfernt
Neuer aktiver Schutz:
- Webshell-/Backdoor-Dateinamen-Check verdrahtet (suspicious_filename: 60).
Regex wortgrenzen-verankert gegen Fehlalarm auf PSEMailerAntispam.js
Effizienz/Struktur:
- crawler nutzt requests.Session (keep-alive)
- Cache-Buster-Normalisierung an einer Stelle (Extraktion) -> stabile
Snapshots, differ wieder reiner Set-Diff
Tests: 111 gruen (neu: test_checker.py + Regressionstests)
CLAUDE.md aktualisiert
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Neue 4xx/5xx-Seiten (nicht in Baseline) werden bewertet (+20 Pkt) und
lösen ab Schwelle einen Alert aus. Bekannte kaputte Links (in Baseline
vorhanden) erscheinen im Report als [bekannt] ohne Score-Beitrag.
Motivation: erster Crawl fand bredelar.info/www.stadtmarketing-marsberg.de
(404) — CMS-Fehler durch Schema-losen href. Soll dauerhaft sichtbar sein.
Änderungen: checker.find_broken_pages(), differ.compare_snapshots() mit
new_broken_urls/known_broken_urls, score_diff(), Report-Abschnitt,
config-Default new_broken_link:20, 4 neue Tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- extractor.py: _find_comment_links() liefert nur noch externe Links.
Interne Links in Kommentaren sind CMS-Artefakte (auskommentierte
Navigations-Fragmente), keine SEO-Spam-Indikatoren.
- allowed_external.yaml: 36 legitime externe Domains nach initialem
Crawl von bredelar.info manuell geprüft und eingetragen.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PyYAML parst auskommentierte Listen als None statt []. Da der Key
vorhanden ist, greift .get(key, []) nicht. Drei Fixes:
- extractor.py, differ.py: `or []` statt Default-Argument
- config.py: _deep_update überspringt None-Override auf List-Defaults
Tritt auf bei `ignore_selectors` und `ignore_patterns` in config.yaml.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>