really read data from file for write
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 6 Feb 2011 16:41:07 +0000 (17:41 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 6 Feb 2011 16:41:07 +0000 (17:41 +0100)
nfc-card-dumper.pl

index afc3140..37bee84 100755 (executable)
@@ -84,7 +84,7 @@ if ($r->init()) {
        my $out_file = write_card_dump $tag => $card;
 
        if ( $opt->write ) {
-               read_file $opt->write;
+               $card = read_file $opt->write;
                foreach my $block ( 0 .. $tag->blocks ) {
                        my $offset = 0x10 * $block;
                        my $data = substr($card,$offset,0x10);