From fb4b3502eff4011cad39fdb7bd7adbee0f041a38 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 7 Feb 2018 23:54:11 +0100 Subject: [PATCH] fix: 'script run mifare_autopwn.lua' - wrong bool comparision --- client/scripts/mifare_autopwn.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client/scripts/mifare_autopwn.lua b/client/scripts/mifare_autopwn.lua index 8eea7376f..ae32b5c66 100644 --- a/client/scripts/mifare_autopwn.lua +++ b/client/scripts/mifare_autopwn.lua @@ -110,15 +110,13 @@ end -- -- performs a test if tag nonce uses weak or hardend prng local function perform_prng_test() - local isweak = core.detect_prng() - if isweak == 1 then + if isweak then dbg('PRNG detection : WEAK nonce detected') - return true + else + dbg('PRNG detection : HARDEND nonce detected') end - - dbg('PRNG detection : HARDEND nonce detected') - return false + return isweak end --- -- The main entry point