zondag 19 december 2010

Ideal Linux screensaver with a cool effect and little CPU/GPU use

My Gefore 8400 GS graphics card's fan is broken, so my GPU's core temperature is going up to 95°C in normal use. Gaming brings it up to 125°C sometimes, which is the "slowdown threshold" (thanks, Nvidia!) to protect against burning plastic.

So here's my new, ultra-tweaked screensaver command:
wormhole -root -delay 34426 -zspeed 2 -stars 7 -fps

Wormhole is part of the "xscreensaver" package (on my Ubuntu it installs in /usr/lib/xscreensaver/wormhole).

It runs at 28fps at 3% CPU use of my Intel Dual Core 2 something something.
Don't know how much GPU it uses but it stays pretty cool now (about 92°C at the moment).
Pretty good, right ?

dinsdag 2 november 2010

Holding you in the holes

In Dutch there's an expression for saying you're keeping an eye on someone, "Iemand in de gaten houden".

Translated (too) literally, this becomes: "Holding someone in the holes".

I'm holding you in the holes, man !

maandag 20 september 2010

If it's good for you, it's good for everyone who benefits from you!

[Editors note: I principle this is correct but in fact it's not.]

zaterdag 11 september 2010

A letter to my Aunt Carla (bust'n street cred y'all :-)


Yow AC,

We cool, hang'n on ma boat, cruz'n with ma bitch. Scuba shit in deep blue...

This nigga represent'n for real daug, livin' big like 2pac -you know wha'm say'n?

Brotherlove to the street, T to the Y with the zigga-zigga ringzzz.

PS: diggin' your shots, bless!


donderdag 2 september 2010

Chance of my next plane flight crashing

The general aviation accident rate is 7.11 accidents/100,000 flight hours and the commercial aviation accident rate is 0.149 accidents/100,000 flight hours.

My next flight will last 4 hours, enough to hold 0.0000056 accidents. So to actually be in one accident I'll need to be on 178 572 flights of 4 hours.

So the chance of my next flight crashing is 1 in 178 572.

dinsdag 17 augustus 2010

Failing to plan is planning to fail

I'm reading "Never eat alone"

maandag 9 augustus 2010

Rules for building street cred

1. Keep your cool.

2. Run from the cops.

3. Treat your car like a woman.

4. Treat your woman like a dog.

zaterdag 17 juli 2010

Nomad Warrior

We should be able to work and play anyplace, in many circumstances. This planet could be our mobile office.

maandag 12 juli 2010

GPS logging as part of my self tracking setup

Here's a quick overview of the GPS logging part of my self tracking setup.

GPS logging
I'm using InstaMapper on my Android phone to track my position (every 30s).

Downloading GPS data
A few times a day, a shell script downloads the position data in CSV format using the InstaMapper API.
A typical CSV file looks like this:
2422576166695,Nexus One,1278915999,50.93014,3.63114,55.0,1.5,275
2422576166695,Nexus One,1278916059,50.93017,3.62980,52.0,1.7,274
2422576166695,Nexus One,1278916120,50.93022,3.62837,51.0,1.5,253
2422576166695,Nexus One,1278916181,50.93052,3.62713,58.0,1.8,285
2422576166695,Nexus One,1278916241,50.93049,3.62579,67.0,1.5,285
2422576166695,Nexus One,1278916301,50.93077,3.62449,54.0,1.2,260

Enriching GPS data
Every day, another shell script enriches that data by adding the names of known locations. It uses the Google Contacts API to fetch known locations and their addresses from my Google Contacts address book, and then uses Google Maps to convert those addresses to GPS coördinates.
The resulting CSV file will look like this:µ
Tue Jun 29 08:45:33 CEST 2010|51.03728,3.71103|11.96737|Gent-Sint-Pieters (126 m)
Tue Jun 29 08:46:34 CEST 2010|51.03696,3.71184|3.95215|Gent-Sint-Pieters (116 m)
Tue Jun 29 08:52:08 CEST 2010|51.03703,3.71191|.09921|Li De Clerck (145 m),Gent-Sint-Pieters (125 m)
Tue Jun 29 08:53:08 CEST 2010|51.03669,3.71167|2.48479|Gent-Sint-Pieters (86 m)
Tue Jun 29 08:54:09 CEST 2010|51.03671,3.71152|.63349|Gent-Sint-Pieters (80 m)

This setup is very up-to-date and dynamic, since it uses live data from the Google API's. As you can see, it adds the name of a location (such as "Gent-Sint-Pieters") or the name of a person (such as "Li De Clerck") whenever I'm within 100m from it.

I'm releasing all relevant scripts under GPL 3.0, feel free download and play with them !

Getting EMV/CAP challenge/response to work

Let's recap; I've been sing my Belgian EID smartcard reader to query my KBC debit card. This has been working great, and I'm now able to select the SecureCode application and unlock it by verifying my PIN code.

Now I'm trying to get the challenge/response mechanism to work, so I can have my PC automatically login to KBC Online. This should work by now, but for some reason the response always turns out to be wrong...

Warning: if you're playing with this as well, keep in mind that KBC will only allow 3 failed attempts at logging in. So when you've failed twice, log in using the normal method (that actually works) to reset the login try counter.

According to the specs, we need to generate an Application RQ Cryptogram, and then cancel it by requesting an Application Cryptogram. See my script for the dirty details... much of this work is based on EMV CAP examples from "Chip & PIN is broken".

Now if only I could figure out what's wrong with the responses I'm generating !

zondag 13 juni 2010

Finding smartcard Application ID's - a brute force approach

I made this handy script to find Application ID's, since I'm investigating one of my debit cards.

#!/bin/sh

# This is GPL v3 code.
# Author: Tom Van Braeckel 
#
# On my PC, this tries about 22 application ID's / second.
# Doing a full scan will take between 3h and 16 days.

hex="0 1 2 3 4 5 6 7 8 9 A B C D E F"

# 00 = Instruction class
# A4 = SELECT FILE
# 0400 = mandatory
# 07 = length of application id
# A00000 = fixed part of application ID
prefix="00A4040007A00000"
for n1 in $hex; do
for n2 in $hex; do
for n3 in $hex; do
for n4 in $hex; do
for n5 in $hex; do
for n6 in $hex; do
for n7 in $hex; do
for n8 in $hex; do
 totry=$n1$n2$n3$n4$n5$n6$n7$n8
 echo -n "Trying ${prefix}${totry}:"
 echo "${prefix}${totry}" | scriptor 2>/dev/null | grep "<"
done
done
done
done
done
done
done
done

EMV/CAP Application ID's

AID Name
A0000000031010 VISA Credit
A0000000032010 VISA Electron
A0000000033010 VISA Interlink
A0000000034010 Visa Specific
A0000000035010 Visa Specific
A0000000038002 Barclays/HBOS
A0000000038010 VISA plus
A0000000041010 MasterCard Credit
A0000000042010 MasterCard Specific
A0000000043010 MasterCard Specific
A0000000043060 Maestro (Debit)
A0000000044010 MasterCard Specific
A0000000045010 MasterCard Specific
A0000000046000 Cirrus
A0000000048002 NatWest or SecureCode Aut
A0000000250000 America Express
A0000001410001 Pagobancomat
A0000002040000 ?
A0000002281010 SAMA
A0000002771010 INTERAC

dinsdag 1 juni 2010

SmartCardSessions: Welcome

I'm keeping an online, public diary of some of my smartcard experiments here.