projects
/
perl-Mifare-MAD.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
884f0b0
)
skip empty blocks (and thus dumping only first 16 sectors on 1k mifare card
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 23 Jan 2011 15:59:24 +0000
(16:59 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 23 Jan 2011 15:59:24 +0000
(16:59 +0100)
mifare-mad.pl
patch
|
blob
|
history
diff --git
a/mifare-mad.pl
b/mifare-mad.pl
index
d5dd772
..
709e5fc
100755
(executable)
--- a/
mifare-mad.pl
+++ b/
mifare-mad.pl
@@
-74,6
+74,8
@@
foreach my $sector ( 0 .. 39 ) {
my $blocks = $sector < 32 ? 4 : 16;
+ next if substr($card,$pos,$blocks * 0x10) eq "\x00" x ($blocks * 0x10);
+
# General purpose byte (GPB)
my $GBP = ord(substr($card,0x39,1));