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:
374e475
)
SWAP=1 to dump low nybble first
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 23 Jan 2011 13:56:33 +0000
(14:56 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 23 Jan 2011 13:56:33 +0000
(14:56 +0100)
mifare-mad.pl
patch
|
blob
|
history
diff --git
a/mifare-mad.pl
b/mifare-mad.pl
index
2472cfc
..
2adb705
100755
(executable)
--- a/
mifare-mad.pl
+++ b/
mifare-mad.pl
@@
-136,6
+136,12
@@
foreach my $i ( 0 .. 15 ) {
my $hex = unpack('H*',$block);
$hex =~ s/(....)/$1 /g;
+ if ( $ENV{SWAP} && $j < 3 ) {
+ my $hex_sw = unpack('h*',$block);
+ $hex_sw =~ s/(....)/$1 /g;
+ $hex .= " | $hex_sw";
+ }
+
printf "%04x %s %03b %s\n", $offset, $hex
, $cond
, $j < 3 ? $access_condition_data->{$cond} : $access_condition_trailer->{$cond}