Go to file
2024-05-13 09:54:22 -04:00
cmd Corrected linter errors 2024-02-28 11:09:47 -06:00
docker Build using local source files instead of git cloning; do not strip or upx-compress the debug binary 2024-02-21 07:57:13 -06:00
vendor Updated transitive dependencies 2024-05-13 09:54:22 -04:00
.gitignore Initial commit 2023-08-28 13:39:33 -05:00
build-docker.sh Build using local source files instead of git cloning; do not strip or upx-compress the debug binary 2024-02-21 07:57:13 -06:00
build.sh Bump Go version to 1.22; remove openbsd/mips builds 2024-02-07 12:09:46 -06:00
default.pgo Update PGO profile 2024-02-11 09:16:06 -06:00
go.mod Updated transitive dependencies 2024-05-13 09:54:22 -04:00
go.sum Updated transitive dependencies 2024-05-13 09:54:22 -04:00
LICENSE Update release year 2024-01-14 12:39:35 -06:00
main.go Update release year 2024-01-14 12:39:35 -06:00
README.md Update readme with new docker build command 2024-02-21 07:58:14 -06:00

About

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.

Currently available tools

Dice roll

Roll a specified number of dice.

Optionally display individual roll results, as well as total, by appending ?verbose.

Examples:

DNS

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:

Hashing

Hash the provided string using the requested algorithm.

Examples:

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.

HTTP Status Codes

Receive the requested HTTP response status code.

Examples:

IP address

View your current public IP.

Examples:

MAC Lookup

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:

QR Codes

Encode a string as a QR code (either a PNG or an ASCII string).

Examples:

Time

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:

Usage output

Serves a variety of web-based utilities.

Usage:
  query [flags]

Flags:
      --all                    enable all functionality
  -b, --bind string            address to bind to (default "0.0.0.0")
      --dns                    enable DNS lookup functionality
      --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 functionality
  -h, --help                   help for query
      --http-status            enable HTTP response status code functionality
      --ip                     enable IP lookup functionality
      --mac                    enable MAC lookup functionality
      --max-dice-rolls int     maximum number of dice per roll (default 1024)
      --max-dice-sides int     maximum number of sides per die (default 1024)
      --max-image-height int   maximum height of generated images (default 1024)
      --max-image-width int    maximum width of generated images (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 functionality
      --qr-size int            height/width of PNG-encoded QR codes (in pixels) (default 256)
      --roll                   enable dice rolling functionality
      --time                   enable time lookup functionality
  -v, --verbose                log tool usage to stdout
  -V, --version                display version and exit

Building the Docker image

From inside the cloned repository, build the image using the following command:

REGISTRY=<registry url> LATEST=yes TAG=alpine ./build-docker.sh