Projects

Select list of personal projects in alphabetical order.
Click any of the project names to jump to their sections.

after

after is an OpenBSD-specific program that echoes a string after a process has died.
In traditional interactve Unix-like shell usage if you wanted to echo something after a program is finished running you’d do:

$ program; echo "finished!".

But what if you’ve already started program and don’t want to stop it, but still want to run some other code after it finishes? That’s what after is for:

$ after -n program -e "finished!"

You can use after’s output to run shell commands. For instance, if you wanted to shutdown your machine after your program is finished:

$ after -n program -e "shutdown -p now" | sh

The only reason after is OpenBSD-specific is because at the time I mainly used OpenBSD.

hidlock

hidlock is an OpenBSD-specific hotplugd(8) script that locks all X displays when a new Human Interface Device is detected by hotplugd(8).

Essentially it aims to protect against HID attacks in which malicious HIDs are used to inject keystrokes into users machines - with hidlock the display is locked as soon as the HID is attached - this way any injected keystrokes get sent straight to the lockscreen and nowhere near the user’s environment.
See the project’s README for screenshots and a more in-depth explanation.

humin

Inspired by human - which prints number in human-readable format - humin is a simple CLI program to convert seconds to human readable time. It’s one of my first publicly published C programs and so it isn’t very good. The conversion logic is not very efficient and possibly just plain wrong. I have plans to rewrite it from scratch. Simply put this is what it can do:

$ humin 10000
02:46:40
$ humin 100000
01 days 03:46:40

nlcc

nlcc was written while on semester break for University as part of a cryptography research project. For this project a small team of us students were tasked with researching an analysing one of the contenders for NIST’s Lightweight Cryptography Competition.

We had to narrow down candidates in order to choose a single algorithm to analyse.
The competition entires’ C implementation code had to adhere to a specific API/spec. I figured I could use this to create a plug-and-play program that would allow any one of the entires to be compiled into a CLI executable - that’s what nlcc is. It allows the user to specify inputs for the cipher’s AEAD paramaters through the command-line; it performs both encryption and decryption and shows a summary of the algorithm inputs:

$ ./nlcc -k ./file -m "testing message" -a "adadadadad"
Key   = ffffffffffffffffffffffffffffffff (128)
Nonce = 000000000000000000000000 (96)
AD    = 61646164616461646164 (80)
PT    = 74657374696e67206d657373616765 ("testing message") (120)
CT    = 87e649bf2c3e6c83cbb1ee7120c419a1f58b03b0386258

page

A command-line password manager written in Go that uses the age encryption algorithm for storing secrets It uses $EDITOR to edit entries, supports decrypting+copying secrets to the clipboard, random string password generation.

I used this as my main password manager for a long time (utilising Termux on Android to use it on my phone). Its inspired by many other CLI password managers including its predecessor, cpass.

I’ve switched to Bitwarden for password management these days, but I spent a lot of time building and “perfecting” page for my own use.

pledgeme

A super small command-line program to pledge(2) arbitrary programs on OpenBSD. See the README for more info.

recreg

recreg is a small ffmpeg script that makes recording a specific region of an X11 screen a little less painful:

rr 260x320+0+760 bottom_right_corner.mkv

reprose

reprose is a super basic Go package server that essentially just redirects go-get requests to git repos. It powers go.zakaria.org.

sghs

Shitty Go HTTP Server - a super simple Go HTTP fileserver for just serving files. Supports TLS too, if you’ve got the cert files for it.

shite

A collection of shell scripts used to generate this static site. It uses standard Unix stuff like find, sed, and uses lowdown to convert Markdown into HTML.

Very opinionated, you probably don’t want to use it :P.

stsd

Secure Time Sync Daemon. A system daemon that uses HTTP date headers over TLS (HTTPS) to set system date as opposed to NTP. Why not NTP? See the README.

subc

A super small, super simple subcommand package for Go. It wraps the standard flag package and uses FlagSets to create arbitrary “subcommands” for CLI projects. It’s used by page.

wlscheck

Go package that tests whether you’re running on WSL based on the kernel version string. It’s used in page to know whether to use Windows’ clip.exe.

yubilock

yubilock is another hotplugd(8) script similar to hidlock, except it locks the display when a YubiKey device is removed.

Contributions

List of open-source projects I have contributed to in some capacity.
Spelling mistakes/formatting changes not included.