A bunch of useless tools, all available via convenient HTTP endpoints!
Feature requests, code criticism, bug reports, general chit-chat, and unrelated angst accepted at query@seedno.de
.
Static binary builds available here.
x86_64 and ARM Docker images of latest version: oci.seedno.de/seednode/query:latest
.
Dockerfile available here.
An example instance with all features enabled can be found here.
The following configuration methods are accepted, in order of highest to lowest priority:
- Command-line flags
- Environment variables
Roll a specified number of dice.
Optionally display individual roll results, as well as total, by appending ?verbose
.
Examples:
Look up DNS records for a given host.
An alternate DNS resolver can be specified via --dns-resolver
(e.g. --dns-resolver "1.1.1.1:53"
). If none is provided, the system default is used.
This uses Team Cymru's IP to ASN mapping service, so please be considerate about traffic volume.
Examples:
Hash the provided string using the requested algorithm.
Examples:
- /hash/md5/foo
- /hash/sha1/foo
- /hash/sha224/foo
- /hash/sha256/foo
- /hash/sha384/foo
- /hash/sha512/foo
- /hash/sha512-224/foo
- /hash/sha512-256/foo
In addition to providing the value to be hashed in the URL, you can submit it as the body of a GET request, so long as no value is provided in the URL.
For example, curl -X GET https://q.seedno.de/hash/sha512-224/ -d "test"
will return the SHA512/224 hash for test
.
Receive the requested HTTP response status code.
Examples:
View your current public IP.
Examples:
Look up the vendor associated with any MAC address.
The Wireshark manufacturer database is embedded in the generated binary, but a local version can be used instead by providing the --oui-file
argument.
Examples:
Encode a string as a QR code (either a PNG or an ASCII string).
Examples:
Look up the current time in a given timezone and format.
Values can optionally be formatted via the ?format=
query parameter by specifying any layout from the Go time package.
Format values are case-insensitive.
Examples:
Almost all options configurable via flags can also be configured via environment variables.
The associated environment variable is the prefix QUERY_
plus the flag name, with the following changes:
- Leading hyphens removed
- Converted to upper-case
- All internal hyphens converted to underscores
For example:
--dns-resolver 1.1.1.1:53
becomesQUERY_DNS_RESOLVER=1.1.1.1:53
--max-dice-rolls 256
becomesQUERY_MAX_DICE_ROLLS=256
.
Serves a variety of web-based utilities.
Usage:
query [flags]
Flags:
--all enable all features
-b, --bind string address to bind to (default "0.0.0.0")
--dns enable DNS lookup
--dns-resolver string custom DNS server IP and port to query (e.g. 8.8.8.8:53)
--exit-on-error shut down webserver on error, instead of just printing the error
--hash enable hashing
-h, --help help for query
--http-status enable HTTP response status codes
--ip enable IP lookups
--mac enable MAC lookups
--max-dice-rolls int maximum number of dice per roll (default 1024)
--max-dice-sides int maximum number of sides per die (default 1024)
--oui-file string path to Wireshark manufacturer database file
-p, --port uint16 port to listen on (default 8080)
--profile register net/http/pprof handlers
--qr enable QR code generation
--qr-size int height/width of PNG-encoded QR codes (in pixels) (default 256)
--roll enable dice rolls
--subnet enable subnet calculator
--time enable time lookup
--tls-cert string path to TLS certificate
--tls-key string path to TLS keyfile
-v, --verbose log tool usage to stdout
-V, --version display version and exit
From inside the cloned repository, build the image using the following command:
REGISTRY=<registry url> LATEST=yes TAG=alpine ./build-docker.sh