Add harx: comprehensive HAR file extraction and analysis toolkit#1
Open
Add harx: comprehensive HAR file extraction and analysis toolkit#1
Conversation
Replace the legacy 86-line `har-extract.pl` interactive script with a modular, fully-tested CLI toolkit (`harx`) that turns the project into a professional tool for web developers, QA, pentesters and performance analysts. Old script is removed (clean replacement, no compat shim). Highlights: - 15 git-style subcommands: extract, validate, sanitize, audit, convert, report, diff, merge, dedupe, slice, graphql, websocket, endpoints, stats, completions. - Powerful filtering: URL regex/glob, domain glob, method, status spec (200,2xx,4xx-5xx), MIME, size with K/M/G suffixes, time window, has-header, header-regex, has-cookie, body content regex, initiator, scheme, cache state, HTTP version, plus a free `--where` boolean DSL. - Robust decoding: gzip/deflate (core), brotli (perl module or CLI fallback), zstd (CLI), charset-aware text decoding. - Security audits: secrets (extensible JSON catalog covering JWT, AWS, GitHub, Stripe, OpenAI, Anthropic, GCP, NPM, Slack, PEM, password-in-URL, ...), headers (per-host scoring of CSP/HSTS/XFO/ XCTO/Referrer/Permissions), cookies (Secure/HttpOnly/SameSite/scope), mixed-content, CORS, PII (Luhn-validated cards, IBAN, locale-aware DNI/NIE for `es`). - `sanitize` produces a redacted HAR safe to share. - Conversion: per-entry curl, single bash script, wget, Postman v2.1, Insomnia v4, Netscape cookies.txt jar. - Reports: terminal stats (top hosts, MIME, slow, duplicates, redirect chains), ASCII waterfall, performance anti-pattern audit, fully self-contained interactive HTML report. - Manipulation: diff, merge, dedupe, slice, validate. - Specialized extractors: GraphQL operation splitting, WebSocket frame timeline, API endpoint inventory with :id/:uuid/:hex normalization. - Output: filesystem, zip, tar.gz, sqlite. Manifests in JSON/CSV/JSONL. Quality: - 314 test assertions across 28 test files (parser, decoder, filter, naming, writer, audits, conversion, reports, special extractors, diff/merge/dedupe/slice, end-to-end CLI integration). - Modular architecture: ~30 modules under `lib/HAR/Extractor/*`. - Core-only Perl deps (5.36+); optional features detect their deps at runtime and degrade gracefully. - `cpanfile`, `Makefile.PL`, GitHub Actions CI matrix (Perl 5.36/5.38/5.40 on Linux + smoke on macOS). - README, USAGE, COOKBOOK (20 recipes), `harx(1)` man page, CHANGELOG. The original GPL-3.0-only license and Saúl Blanco Tejero's authorship are preserved. https://claude.ai/code/session_01JrmAXvAwQh6yX3offyo81E
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces
harx, a complete command-line toolkit for working with HTTP Archive (HAR) files. It replaces the previous simplehar-extract.plscript with a full-featured application supporting extraction, filtering, auditing, sanitization, and conversion of HAR files.Key Changes
Core Infrastructure
lib/HAR/Extractor/with 40+ modulesbin/harx) with subcommand dispatch systemExtraction & Output
2xx,404,500-599), MIME types, size ranges with K/M/G suffixes, time windows, headers, cookies, and body contentAuditing & Security
Advanced Features
Testing & Documentation
Implementation Details
https://claude.ai/code/session_01JrmAXvAwQh6yX3offyo81E