Wardriving – The triangulation algorithm

Introduction For my previous post, where I find the signal strength of WiFi spots, I also needed an algorithm to actually locate the spot. I decided to use triangulation, which is commonly used in wireless communications to locate devices based on signal strength from known positions. As my system uses GPS, I had to consider the Earth’s curvature. Calculating the geographic midpoint on a sphere isn’t trivial, but GeoMidpoint provides a great explanation (Method A). ...

August 7, 2010 · 3 min · Michael Bisbjerg

C# Wifi Scanner

Introduction I’ve long wanted to build a WiFi-based application—ideally one that also records GPS location data for wardriving. I searched for manageable C# solutions integrated with .NET. First Attempts I explored many WMI tutorials, but on Windows 7, I lacked the needed namespaces like MSNdis_80211_ServiceSetIdentifier. Eventually, I discovered the WLan API (available since Windows XP SP3), usable via P/Invoke. Fortunately, someone made a ManagedWifi wrapper for it—perfect! The Scanner I wrote a small utility that scans for SSIDs across all interfaces and retrieves their MAC addresses. ...

August 5, 2010 · 1 min · Michael Bisbjerg

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