Danish CPR Numbers

I was reading several articles about the new NemID system in Denmark, and concerns around how organized groups might generate valid CPR numbers and brute-force passwords. This could lead to account lockouts—potentially paralyzing major parts of the country’s digital infrastructure. To test this, I created code to generate valid CPR numbers based on known rules. The Rules The original rules were based on a textbook I no longer have, but I found newer ones via this blog post, official article, and PDF document from the CPR register. ...

August 3, 2010 · 3 min · Michael Bisbjerg

Mobifinance – Loaning organized

Idea While on a trip to Jutland, I had a splendid idea: a system to track loans—who I loaned money to and whether I ever got it back. It had to work on mobile devices and as a web app, so I built it as a small webpage. I used an MSSQL database (hosted by addnet.dk) and wrote the app in C#. Database I built a single main table, Finances, for all loans and edits. Each finance can have a parent—NULL indicates a root loan. This allows loan tracking and later edits. A root loan of +10 DKK, followed by a -10 DKK update, resolves to 0 (paid). ...

August 1, 2010 · 2 min · Michael Bisbjerg

Linux incremental hardlink backup system

Introduction While reviewing my old college’s IT class backup system (due to running low on disk space), I discovered a major flaw: a weekly 1:1 backup of every user’s files—about 40 GB per week. Many of these files never change. Ever. Solution: Incremental backups. I challenged myself to code an incremental backup system using only Python and the Linux extfs filesystem. The Scenario At my former college, students ran the IT department. They set up a system with a 2 TB drive (two 1 TB disks) that made weekly full backups of every user, including alumni. ...

July 29, 2010 · 3 min · Michael Bisbjerg

SMS System

Introduction As part of the OEP platform at my previous college, we designed an SMS subsystem for messaging Danish mobile phones. It was intended for alerts like account lockouts or password resets. I coded it in Python. The Scenario We used LDAP as a central user database. The script needed to accept either a phone number or username, then look up the mobile number via LDAP (mobile attribute). I used python-ldap for this, available via Ubuntu’s package system. ...

July 29, 2010 · 2 min · Michael Bisbjerg