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:
ebf07de
)
reformat hex dump in 4-bytes separated by space
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 22 Jan 2011 23:14:16 +0000
(
00:14
+0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 22 Jan 2011 23:14:16 +0000
(
00:14
+0100)
mifare-mad.pl
patch
|
blob
|
history
diff --git
a/mifare-mad.pl
b/mifare-mad.pl
index
bf9994a
..
2472cfc
100755
(executable)
--- a/
mifare-mad.pl
+++ b/
mifare-mad.pl
@@
-133,7
+133,10
@@
foreach my $i ( 0 .. 15 ) {
;
$cond >>= $j;
- printf "%04x %s %03b %s\n", $offset, unpack('H*',$block)
+ my $hex = unpack('H*',$block);
+ $hex =~ s/(....)/$1 /g;
+
+ printf "%04x %s %03b %s\n", $offset, $hex
, $cond
, $j < 3 ? $access_condition_data->{$cond} : $access_condition_trailer->{$cond}
;