~abyxcos/openbsd_scripts

Scripts/utilities ported to OpenBSD
And now change our quote soup to a subshell so we can express what is actually going on with the JSON much clearer. Credit ~qbit.
The TTL value is a constant, not a variable, it doesn't need the string escaping. Credit ~jrick.
Update the JSON blob to use the double single double quote concat method so we don't have to escape all the double quotes. Credit ~jrick.

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~abyxcos/openbsd_scripts
read/write
git@git.sr.ht:~abyxcos/openbsd_scripts

You can also use your local clone with git send-email.

#OpenBSD scripts

A collection of tools, scripts, and utilities either written or ported to OpenBSD using as few dependencies as possible. These scripts are intended for use on systems that may not have many packages installed, such as routers.

#pastebin

Pastebin is a perl script using only HTTP::Tiny from base. It can upload files to any pastebin that has a sensible API. Right now it has support for http://ix.io/ and http://sprunge.us/.

Usage:

uname -a | pastebin
pastebin < errors.log

#dyn_gandi.{pl,sh}

Dyn_gandi are scripts to update Gandi DNS with your current egress IP. The perl version requires p5-IO-Socket-SSL and p5-Net-SSLeay from packages while the shell version makes use of nc(1) in base.

Usage:

echo -n "my_secret_api_key" > /root/.gandi.key
dyn_gandi.pl domain subdomain
dyn_gandi.sh domain subdomain

#json_pp

Json_pp is just a wrapper around tr(1) to make JSON a little more human-readable (pretty print). It may also be able to stand in where you might otherwise use jq in a script to have an easier time grepping fields out of a run-on JSON blob.

Usage:

ftp -o - https://json.example.com/ | json_pp