A command-line tool for interacting with the URLhaus API.
Part of the abuse.ch CLI toolkit - This project is part of a collection of CLI tools for interacting with abuse.ch services:
- ✅ Uses only Go standard libraries
- 📝 JSON output for easy parsing
- ⚡️ Built-in rate limiting (10 req/s)
- 🐳 Docker, Podman, and Apple container support
brew install andpalmier/tap/urlhsgo install github.com/andpalmier/urlhs@latest# Pull pre-built image
docker pull ghcr.io/andpalmier/urlhs:latest
# Or build locally
docker build -t urlhs .git clone https://github.com/andpalmier/urlhs.git
cd urlhs
make build-
Get your API key from abuse.ch Authentication Portal
-
Set your API key:
export ABUSECH_API_KEY="your_api_key_here"- Query recent URLs:
urlhs recent -urls -limit 10| Command | Description |
|---|---|
recent |
Query recent URLs or payloads |
query |
Query by URL, host, payload, tag, or signature |
download |
Download malware sample by SHA256 |
version |
Show version information |
# Recent URLs
urlhs recent -urls -limit 50
# Recent payloads
urlhs recent -payloads -limit 50# By URL
urlhs query -url "http://example.com/malware.exe"
# By host
urlhs query -host example.com
# By payload hash
urlhs query -hash 12c8aec5766ac3e6f26f2505e2f4a8f2
# By tag
urlhs query -tag Emotet
# By malware signature
urlhs query -signature Goziurlhs download -sha256 <sha256_hash>Warning: Downloaded files are NOT password protected and may trigger antivirus alerts.
# Run with Docker
docker run --rm -e ABUSECH_API_KEY="your_key" ghcr.io/andpalmier/urlhs recent -urls -limit 10
# Run with Podman
podman run --rm -e ABUSECH_API_KEY="your_key" ghcr.io/andpalmier/urlhs recent -urls -limit 10
# Run with Apple container
container run --rm -e ABUSECH_API_KEY="your_key" ghcr.io/andpalmier/urlhs recent -urls -limit 10
# Mount volume for downloads
docker run --rm -e ABUSECH_API_KEY="your_key" -v $(pwd):/data ghcr.io/andpalmier/urlhs download -sha256 <hash>| Variable | Description |
|---|---|
ABUSECH_API_KEY |
Your abuse.ch API key (required) |
This project is licensed under the AGPLv3 License - see the LICENSE file for details.