always create txt MAD dump, but invoke vi only with MAD=1
[perl-Mifare-MAD.git] / nfc-card-dumper.pl
index 820a269..41f6691 100755 (executable)
@@ -97,8 +97,11 @@ if ($r->init()) {
                        symlink $out_file, $card_key_file || die "$card_key_file: $!";
                        warn "$card_key_file symlink created as default key for $uid\n";
                }
-               $ENV{MAD} && system "./mifare-mad.pl $out_file | vi -R -";
        }
 
+       # view dump
+       system "./mifare-mad.pl $out_file > $out_file.txt";
+       $ENV{MAD} && system "vi $out_file.txt";
+
 }