mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
styles
This commit is contained in:
parent
da7dc2353c
commit
db78d26b9f
1 changed files with 4 additions and 6 deletions
|
@ -295,17 +295,15 @@ void RunMod() {
|
||||||
/*
|
/*
|
||||||
Iterates through each sector checking if there is a correct key.
|
Iterates through each sector checking if there is a correct key.
|
||||||
*/
|
*/
|
||||||
int key = -1;
|
|
||||||
int block = 0;
|
|
||||||
bool err = 0;
|
bool err = 0;
|
||||||
bool allKeysFound = true;
|
bool allKeysFound = true;
|
||||||
uint32_t size = mfKeysCnt;
|
uint32_t size = mfKeysCnt;
|
||||||
|
|
||||||
for (int type = !keyType; type < 2 && !err; keyType == 2 ? (type++) : (type = 2)) {
|
for (int type = !keyType; type < 2 && !err; keyType == 2 ? (type++) : (type = 2)) {
|
||||||
block = blockNo;
|
int block = blockNo;
|
||||||
for (int sec = 0; sec < sectorsCnt && !err; ++sec) {
|
for (int sec = 0; sec < sectorsCnt && !err; ++sec) {
|
||||||
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);
|
||||||
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); //red
|
||||||
Dbprintf("\t✕ Key not found for this sector!");
|
Dbprintf("\t✕ Key not found for this sector!");
|
||||||
|
@ -393,12 +391,12 @@ void RunMod() {
|
||||||
Needs further testing.
|
Needs further testing.
|
||||||
*/
|
*/
|
||||||
if (fillFromEmulator) {
|
if (fillFromEmulator) {
|
||||||
uint8_t retry = 5, cnt;
|
uint8_t retry = 5;
|
||||||
Dbprintf("\t Trying to dump into blank card.");
|
Dbprintf("\t Trying to dump into blank card.");
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
LED_A_ON(); //yellow
|
LED_A_ON(); //yellow
|
||||||
for (int blockNum = 0; blockNum < 16 * 4; blockNum += 1) {
|
for (int blockNum = 0; blockNum < 16 * 4; blockNum += 1) {
|
||||||
cnt = 0;
|
uint8_t cnt = 0;
|
||||||
emlGetMem(mblock, blockNum, 1);
|
emlGetMem(mblock, blockNum, 1);
|
||||||
// switch on field and send magic sequence
|
// switch on field and send magic sequence
|
||||||
if (blockNum == 0) flags = 0x08 + 0x02;
|
if (blockNum == 0) flags = 0x08 + 0x02;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue