Parser/ Importer for the IEEE OUI list
posted 2010-08-07 01:14:19,
link to this article
Read full article
In a distant past I created this vendor lookoup page for MAC
addresses, that according to my Google Analytics is still being
used from all over the world. Wow.
Most of the information in this tool was pretty outdated, because
I had imported the IEEE oui.txt file in a SQLite database by hand and
was too lazy to do that again.
Well, today I found some old Perl code back that I started on to
automate this process. I never managed to get that to work
in the past, somehow it worked after only a few edits today.
I quickly added some SQLite Perl DBI stuff, and suddenly the database for mac2vendor is up to date again.
I have published my code to download, parse and import the IEEE OUI file here or follow the read link for the full article.
From now on this script will run as a cronjob from time to time to keep mac2vendor more up to date.
GSM IMSI, MCC and MNC lookup tool
posted 2009-06-28 18:59:33,
link to this article
Read full article
I've written a small tool to decode (or well, that is a big word for taking some substrings ;) ) GSM IMSI (International Mobile Subscriber Identity) numbers.
It then takes the MCC (Mobile Country Code) and MNC (Mobile Network Code) pair, looks it up, and presents you a mobile operator name and country.
Alternatively, you can search by just a MCC or MNC value, or both, and again, it lists all matches.
Follow the read link to give it a try.
TagPop: the making of
posted 2009-05-19 12:28:36,
link to this article
Read full article
As promised before, here is a description of the inner workings of TagPop.
TagPop is a tag cloud of all tags used on this website, in which the size of each tag represent its popularity among the visitors of this site. The popularity is measured based on pageviews of individual articles.
PostgreSQL Enums for fun and profit
posted 2009-04-12 22:24:03, link to this article
Once in a while I find the need to reinvent the wheel when programming, when working on some project recently, the wheel happened to be syslog.Nothing wrong with syslog, but I felt the need to write my own logging to a table in a Postgres database.
While doing so I found a great way for deciding whether an event can be logged at a certain log level using an enumerated datatype in Postgres.
First we define the log levels (severities) as an Enum:
CREATE TYPE eventseverity AS ENUM (
'debug',
'notice',
'warn',
'error'
);
Every event in the database will have a severity assigned to it.
Now, to decide whether a event can be logged when a certain threshold
is set, we can make use of this enumerated datatype:
SELECT enum_range(
log_threshold::eventseverity,
enum_last(null::eventseverity)) @> '{notice}'
FROM eventconfig
;
Where '{notice}' is the current log level to be tested.
This returns a boolean that tells whether the tested log level is above or below the threshold.
This can of course be integrated into more complicated queries.
For example in my project this does a boolean OR over rows returned for
different thresholds.
SQLite based Bluetooth device logger
posted 2008-11-01 22:16:40,
link to this article
Read full article
Btsql is a simple Bluetooth device logger, originally written in Perl, but later I rewrote it in C to support multiple Bluetooth (HCI) devices. The C source is very rough, but it basically works. :-)
All application logic resides within the SQLite3 database, that way the logger doesn't need to do more than blindly inserting values in the database. A couple of triggers do the rest.
isquared.nl rss (atom)