- Introduction
- Installation
- Basic Usage
- Enterprise Security Features
- HTTP Request Features
- Security Scanning
- Command Reference
- Best Practices
http-cli is a comprehensive HTTP client and security vulnerability scanner written in Go. It combines the utility of tools like Postman/cURL with enterprise-grade security testing capabilities, including compliance mapping, role-based access control (RBAC) testing, and Zero-Trust architecture validation.
-
Download the latest release for your platform from GitHub Releases
-
Extract the archive:
# For Linux/macOS tar -xzf httpcli-linux-amd64.tar.gz # For Windows (PowerShell) Expand-Archive httpcli-windows-amd64.zip
-
Move to system PATH (optional, for global access):
# Linux/macOS sudo mv httpcli /usr/local/bin/ # Or add to your user bin directory mv httpcli ~/.local/bin/
- Go 1.18 or higher
- Build the tool:
now move it to user bin or use it from currunt dir
go mod tidy go build -o httpcli main.go
sudo mv httpcli /usr/local/bin/
- Run:
./httpcli -url "https://api.example.com"
# GET Request
./httpcli -url "https://api.example.com/users"
# POST with JSON
./httpcli -X POST -url "https://api.example.com/users" \
-H "Content-Type:application/json" \
-d '{"name":"John", "role":"admin"}'Automatically map security findings to major compliance standards.
Supported Standards:
- PCI DSS: Payment Card Industry Data Security Standard
- HIPAA: Health Insurance Portability and Accountability Act
- GDPR: General Data Protection Regulation
Usage:
# Generate a report checking against PCI DSS and GDPR
./httpcli -url "https://api.example.com" -scan -compliance pci,gdpr
# Output JSON report for integration
./httpcli -url "https://api.example.com" -scan -compliance pci -report-format jsonAutomated testing for Broken Access Control. Verify if lower-privileged roles can access high-privilege endpoints.
-
Create a
roles.jsonconfiguration:{ "roles": [ { "name": "guest", "headers": { "Authorization": "Bearer guest-token" } }, { "name": "user", "headers": { "Authorization": "Bearer user-token" } } ] } -
Run the Scan:
# Test if 'guest' or 'user' can access the admin panel ./httpcli -url "https://api.example.com/admin/settings" -scan -rbac-config roles.json
Validate that your application adheres to Zero-Trust principles: "Never Trust, Always Verify".
Checks Performed:
- Strict Transport Enforcement: Verifies HSTS with
includeSubDomains. - Modern Encryption: Enforces TLS 1.2+ (Flags plaintext or weak ciphers).
- Ubiquitous Authentication: Flags any endpoint that is publicly accessible (status 200 without auth headers).
Usage:
./httpcli -url "https://api.example.com/resource" -scan -check-architecture zero-trustEnsure security testing itself is secure and auditable.
- Audit Logging: Generates a cryptographically signed log of all actions (
audit.log). - Redaction: Automatically masks secrets (API Keys, Tokens) in console output.
Usage:
# Run with audit logging and output redaction enabled
./httpcli -url "https://api.example.com" -scan -audit-log -redactSupports all standard HTTP capabilities:
- Methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS.
- Headers: Custom key-value pairs (
-H "Key:Val"). - Body: Raw string (
-d) or file-based (-data-file). - Files: Multipart upload support (
-f "file=@/path/to.pdf").
The tool includes 15+ built-in vulnerability scanners:
- SQL Injection (
sql) - XSS (
xss) - Path Traversal (
path) - SSRF (
ssrf) - XML External Entity (
xxe) - Command Injection (
cmd) - IDOR (
idor) - OWASP API8:2023 Security Misconfiguration (
misconfig) - HTTP Request Smuggling (Desync) (
desync) - And more...
Run a full scan:
./httpcli -url "https://target.com" -scanRun security misconfiguration scan:
./httpcli -url "https://target.com" -scan -scan-type misconfigRun HTTP desync/smuggling scan:
./httpcli -url "https://target.com" -scan -scan-type desyncImportant Limitations:
Go's HTTP client automatically normalizes headers, limiting raw socket manipulation Detection is conservative and flags potential issues for manual verification Results marked as "Medium" severity require further testing with specialized tools (like Burp Suite's HTTP Request Smuggler)
Note: This is a detection tool, not a full exploitation framework. Positive results should be verified with dedicated desync testing tools.
| Flag | Description |
|---|---|
-url |
Target URL (Required) |
-scan |
Enable security scanning mode |
-compliance |
Comma-separated standards (pci, hipaa, gdpr) |
-rbac-config |
Path to RBAC JSON config file |
-check-architecture |
Architecture mode (e.g., zero-trust) |
-audit-log |
Enable signed audit logging |
-redact |
Mask sensitive data in output |
-report-format |
Report output format (text, json) |
-X |
HTTP Method (default GET) |
-H |
Headers (Key:Value,Key:Value) |
-d |
Request body data |
-f |
Multipart file uploads |
- Zero-Trust: Always run with
-check-architecture zero-trustwhen auditing internal services to ensure no implicit trust exists. - Compliance: Use
-complianceflags during CI/CD pipelines to catch violations early. - Audit: Enable
-audit-logwhen performing penetration tests for client accountability.