partial fix for mattyrun

This commit is contained in:
iceman1001 2020-02-28 10:01:52 +01:00
commit 9dc419cec5

View file

@ -323,7 +323,7 @@ void RunMod() {
Dbprintf("\tCurrent sector:%3d, block:%3d, key type: %c, key count: %i ", sec, block, type ? 'B' : 'A', mfKeysCnt); Dbprintf("\tCurrent sector:%3d, block:%3d, key type: %c, key count: %i ", sec, block, type ? 'B' : 'A', mfKeysCnt);
int key = saMifareChkKeys(block, type, true, size, &keyBlock[0], &key64); int key = saMifareChkKeys(block, type, true, size, &keyBlock[0], &key64);
if (key == -1) { if (key == -1) {
LED(LED_RED, 50); //red LED(LED_RED, 50);
Dbprintf("\t✕ Key not found for this sector!"); Dbprintf("\t✕ Key not found for this sector!");
allKeysFound = false; allKeysFound = false;
// break; // break;
@ -348,7 +348,10 @@ void RunMod() {
TODO: TODO:
- Get UID from tag and set accordingly in emulator memory and call mifaresim with right flags (iceman) - Get UID from tag and set accordingly in emulator memory and call mifaresim with right flags (iceman)
*/ */
if (!allKeysFound && keyFound) { if (allKeysFound) {
Dbprintf("\t✓ All keys found");
} else {
if (keyFound) {
Dbprintf("\t✕ There's currently no nested attack in MattyRun, sorry!"); Dbprintf("\t✕ There's currently no nested attack in MattyRun, sorry!");
LED_C_ON(); //red LED_C_ON(); //red
LED_A_ON(); //yellow LED_A_ON(); //yellow
@ -359,10 +362,10 @@ void RunMod() {
Dbprintf("\t✕ There's nothing I can do without at least a one valid key, sorry!"); Dbprintf("\t✕ There's nothing I can do without at least a one valid key, sorry!");
LED_C_ON(); //red LED_C_ON(); //red
} }
}
// If enabled, transfers found keys to memory and loads target content in emulator memory. Then it simulates to be the tag it has basically cloned.
/*
If enabled, transfers found keys to memory and loads target content in emulator memory. Then it simulates to be the tag it has basically cloned.
*/
if ((transferToEml) && (allKeysFound)) { if ((transferToEml) && (allKeysFound)) {
emlClearMem(); emlClearMem();