HTTP Security & Auth
Auth & enterprise options
Flag |
What it does |
|---|---|
|
HTTP Basic authentication |
|
Bearer token (OAuth2) |
|
Custom API key header |
|
mTLS client certificate |
|
Proxy support |
|
SNI override |
|
Interface binding |
|
Adds |
|
Custom User-Agent |
|
Cookie (repeatable) |
|
Skip TLS verification (internal servers) |
Auth examples
# Basic auth
net-benchmark http benchmark \
--targets https://httpbin.org/basic-auth/user/pass \
--auth "basic:user:pass"
# Bearer token (standard OAuth2)
net-benchmark http benchmark \
--targets https://api.example.com/data \
--auth "bearer:sk-abc123"
# Custom API key header (x-api-key)
net-benchmark http benchmark \
--targets https://api.example.com/echo \
--method POST \
--headers "x-api-key:sk-abc123"
# mTLS client certificate
net-benchmark http benchmark \
--targets https://mtls.example.com \
--cert client.pem --cert-key client-key.pem
# Proxy with auth
net-benchmark http benchmark \
--targets https://example.com \
--proxy http://proxy:8080 \
--auth "basic:proxyuser:proxypass"
Security headers audited
Every request captures the presence or absence of:
Strict-Transport-Security(HSTS)Content-Security-Policy(CSP)X-Frame-OptionsX-Content-Type-OptionsReferrer-PolicyPermissions-Policy
The Excel Security Headers sheet colour-codes presence (green) and absence (red) per target.
CDN fingerprinting
Detected automatically per request:
Cloudflare
Amazon CloudFront
Fastly
Akamai
Google CDN
Azure CDN
Full security audit example
net-benchmark http benchmark \
--targets https://www.example.com,https://api.example.com \
--assert status=200 \
--assert header_exists=strict-transport-security \
--assert header_value=X-Content-Type-Options=nosniff \
--formats excel,pdf \
--output ./security_audit
Assertions reference
Assert flag |
Description |
|---|---|
|
Assert HTTP status code |
|
Assert body contains string |
|
Assert header is present |
|
Assert header equals value |
|
Assert total latency ≤ N ms |
|
Assert Content-Type |
|
Assert response body ≥ N bytes |
|
Assert response body ≤ N bytes |