}
my $md5 = md5_hex($card);
- my $out_file = "cards/$uid.$md5";
+ my $out_file = "cards/$uid.$md5.mfd";
if ( -e $out_file ) {
warn "$out_file allready exists, not overwriting\n";
} else {
print STDERR "$block ";
}
print STDERR "done\n";
+ } else {
+ # view dump
+ my $txt_file = $out_file;
+ $txt_file =~ s/\.mfd/.txt/ || die "can't change extension to txt";
+ system "./mifare-mad.pl $out_file > $txt_file";
+ $ENV{MAD} && system "vi $txt_file";
}
-
- # view dump
- system "./mifare-mad.pl $out_file > $out_file.txt";
- $ENV{MAD} && system "vi $out_file.txt";
}