improve hf mf wrbl with text and a new param --force to make sure user understands when writing to block 0.

This commit is contained in:
iceman1001 committed 2022-03-24 12:30:48 +01:00
1 parent cdf079a0c1
commit 758e7d9d2b
5 files changed
+28 -10

No files matched your search

+2 -2
View File
@@ -162,14 +162,14 @@ int demodIndalaEx(int clk, int invert, int maxErr, bool verbose) {
// to reduce false_positives
// let's check the ratio of zeros in the demod buffer.
size_t cnt_zeros = 0;
for (size_t i=0; i< g_DemodBufferLen; i++) {
for (size_t i = 0; i < g_DemodBufferLen; i++) {
if (g_DemodBuffer[i] == 0x00)
++cnt_zeros;
}
// if more than 95% zeros in the demodbuffer then assume its wrong
int32_t stats = (int32_t)((cnt_zeros * 100 / g_DemodBufferLen));
if ( stats > 95) {
if (stats > 95) {
return PM3_ESOFT;
}