Skip to main content

This is a new website theme. Help me improve it and give your feedback (opens in a new tab).

/var/log/irl

Password Manager + TOTP

I’d like to have a backup method for TOTP. For this, I’m looking at using the pass-otp extension which is available both in OpenBSD packages and Debian.

There appears to be some way of scanning QR codes with your webcam in order to extract the URIs, but I can skip this because I have a Honeywell Voyager 1450g handheld 2D barcode scanner (it is very fancy).

Basic operation looks like:

  1. Adding TOTP seed to an existing password:
pass otp append path/to/password
  1. Getting a TOTP code:
pass otp path/to/password
  1. Displaying a QR code to add a backup device (tested with Authy on iOS):
pass otp uri -q path/to/password

Gopher Card Catalogue

I’ve recently started organising my “library”. This includes physical books, electronic books, posters, QSL cards, challenge coins and other interesting artifacts. The process of documentation has helped to remove some of the feeling of clutter, and turned it into something more valuable. In particular, manuals and leaflets that came with appliances and electronics that would usually be thrown in a box and forgotten about can now be found easily by simply searching a list to see if I have it.

Toy Finger Daemon

The finger protocol is defined in RFC742. It’s a pretty simple protocol. I’d like to have a more useful output at some point, perhaps including status updates from Mastodon or APRS, but for now I’ve got the hang of reading the request and sending some output with some simple C program.

It uses inetd just like the Gopher server.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

static __dead void
handle_query(char *input, int len)
{
	if (len == 0) {
		printf("Summary:\n\n");
		printf("-USER-\n");
		printf("irl\n");
	} else if (len == 3 && memcmp(input, "irl", 3) == 0) {
		printf("+-----+\n");
		printf("| irl |\n");
		printf("+-----+\n");
		printf("\n");
		printf("  gopher://irl.xyz/1/\n");
		printf("  sip:1388@sip.sdf.org\n");
		printf("  https://iain.learmonth.me/\n");
		printf("  https://hackers.town/@irl/\n");
		printf("  mailto:iain@learmonth.me\n");
	} else {
		printf("Unknown input of %d bytes\n", len);
	}
	exit(0);
}

int
main(int argc, char **argv)
{
	char input[256];
	int i, pos = 0;

	while (pos < 256)
	{
		pos += read(0, &input[pos], 256 - pos);
		for (i = 0; i < pos; i++)
		{
			if (input[i] == '\r' || input[i] == '\n')
				handle_query(input, i);
		}
	}

	printf("Invalid\n");
}