From 800848185319dd8d8b86c775dc510c53db1de7e9 Mon Sep 17 00:00:00 2001 From: Slipn3r <61992469+Slipn3r@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:09:03 +0300 Subject: [PATCH] fix: Mfkey corrupting user dictionary --- frontend/src/pages/NfcTools.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/NfcTools.vue b/frontend/src/pages/NfcTools.vue index 7719b1c..8f000fd 100644 --- a/frontend/src/pages/NfcTools.vue +++ b/frontend/src/pages/NfcTools.vue @@ -170,7 +170,9 @@ export default defineComponent({ this.mfkeyStatus = `Attacking nonce ${i + 1} of ${nonces.length}` try { const key = await this.mfkey(args) - keys.add(key) + if (!key.startsWith('Error')) { + keys.add(key) + } this.$emit('log', { level: 'debug', message: `${this.componentName}: cracked nonce: ${args}, key: ${key}` @@ -205,6 +207,7 @@ export default defineComponent({ } } + dictionary = dictionary.filter(e => e !== 'Error: mfkey run killed on timeout') dictionary = new Set(dictionary) const dictLength = Array.from(dictionary).length for (const key of keys) {