> > > Ecrire à l'auteur < < <          

Most common pin numbers - complete list

An article from DataGenetics explains why the frequency of a 4 digit pin number can be predicted, because people always use the same PIN number scheme. The article presents a colored graphic with frequency of most common PIN codes.
The most commons are : 1234, 1111, 0000, 1212, 7777… The DataGenetics article do not give the full list of the 10.000 PIN code, sorted by most frequent first. In my article, I revert the colored diagram to give an ordered list.

First, be warned that the list of most common pincodes is correct for US or English user : on of the most common code is your birth date, in format DDMM. In France, the date format is usually inverted (MMDD).

On the DataGenetics article, they list the first 20 most common code, and the least common, but there is not a full list. For my own purpose, I want to test user security and I need a complete ordered list. So I build my own, by reverting the color diagram presenting the frequency :

The DataGenetics article present a raw diagram, zoomed (see the article, chapter “Patterns in data”). Each point represent the occurence frequency of a PIN code. The whiter point is, the frequent the PIN code is.
So I use a PHP script to analyze the image, by using the GD library and analysis each pixel. Then I produce a CSV file ordered by frequency.

Here is the PHP code :

$img = imagecreatefrompng('grid.png');
$w = imagesx($img);
$h = imagesy($img);
if ($w != $h) die ('Image is not squared');
if (!imageistruecolor($img)) die('Image is not true color');

$ratiox = $w / 100;
$ratioy = $h / 100;

$i = $j = 0;
for ($x = 0; $x < 100; $x++)
{
for ($y = 0; $y < 100; $y++)
{
$i = ($x * $ratiox) + ($ratiox/2);
$j = (100*$ratioy) - ($y * $ratioy + ($ratioy/2));
$pixelrgb = imagecolorat($img,$i,$j);

$cols = imagecolorsforindex($img, $pixelrgb);
$r = $cols['red'];
$g = $cols['green'];
$b = $cols['blue'];
$nb = round(($r + $g + $b) / 3);
echo "\"";
echo sprintf("%02d", $x);
echo "\";";
echo "\"";
echo sprintf("%02d", $y);
echo "\";";
echo $nb;
echo "\r\n";
}
}
imagedestroy($img);

And here is the CSV file : you have 10.000 lines, and on each line the PIN code (from 0000 to 9999) and the fequency (from 0 (uncommon) to 255 (very common) ). => click here to download all PIN codes.

Laisser un commentaire

CAPTCHA

Hey you spammer : each comments are manually validated. I do not need viagra or rolex.