This commit is contained in:
iceman1001 2019-12-03 14:51:55 +01:00
commit b5be8a3663
5 changed files with 52 additions and 52 deletions

View file

@ -325,10 +325,10 @@ void getKeySettings(uint8_t *aid) {
// LOOP over numOfKeys that we got before.
// From 0x01 to numOfKeys. We already got 0x00. (AMK)
// TODO (iceman)
/*
for (int i = 0x01; i <= 0x0f; ++i) {
}
*/
/*
for (int i = 0x01; i <= 0x0f; ++i) {
}
*/
}
}

View file

@ -642,9 +642,9 @@ static int CmdHFMFPWrbl(const char *cmd) {
#define AES_KEY_LEN 16
#define MAX_KEYS_LIST_LEN 1024
int MFPKeyCheck(uint8_t startSector, uint8_t endSector, uint8_t startKeyAB, uint8_t endKeyAB,
uint8_t keyList[MAX_KEYS_LIST_LEN][AES_KEY_LEN], size_t keyListLen, uint8_t foundKeys[2][64][AES_KEY_LEN + 1],
bool verbose) {
int MFPKeyCheck(uint8_t startSector, uint8_t endSector, uint8_t startKeyAB, uint8_t endKeyAB,
uint8_t keyList[MAX_KEYS_LIST_LEN][AES_KEY_LEN], size_t keyListLen, uint8_t foundKeys[2][64][AES_KEY_LEN + 1],
bool verbose) {
int res;
bool selectCard = true;
uint8_t keyn[2] = {0};
@ -652,7 +652,7 @@ static int CmdHFMFPWrbl(const char *cmd) {
// sector number from 0
for (uint8_t sector = startSector; sector <= endSector; sector++) {
// 0-keyA 1-keyB
for(uint8_t keyAB = startKeyAB; keyAB <= endKeyAB; keyAB++) {
for (uint8_t keyAB = startKeyAB; keyAB <= endKeyAB; keyAB++) {
// main cycle with key check
for (int i = 0; i < keyListLen; i++) {
if (i % 10 == 0) {
@ -922,9 +922,9 @@ static int CmdHFMFPChk(const char *cmd) {
printedHeader = true;
}
PrintAndLogEx(INFO, "| %02d |%32s|%32s|",
sector,
(foundKeys[0][sector][0] == 0) ? "------ " : sprint_hex_inrow(&foundKeys[0][sector][1], AES_KEY_LEN),
(foundKeys[1][sector][0] == 0) ? "------ " : sprint_hex_inrow(&foundKeys[1][sector][1], AES_KEY_LEN));
sector,
(foundKeys[0][sector][0] == 0) ? "------ " : sprint_hex_inrow(&foundKeys[0][sector][1], AES_KEY_LEN),
(foundKeys[1][sector][0] == 0) ? "------ " : sprint_hex_inrow(&foundKeys[1][sector][1], AES_KEY_LEN));
}
}
if (!printedHeader)

View file

@ -756,7 +756,7 @@ int loadFileDICTIONARY(const char *preferredName, void *data, size_t *datalen, u
}
int loadFileDICTIONARYEx(const char *preferredName, void *data, size_t maxdatalen, size_t *datalen, uint8_t keylen, uint16_t *keycnt,
size_t startFilePosition, size_t *endFilePosition, bool verbose) {
size_t startFilePosition, size_t *endFilePosition, bool verbose) {
if (endFilePosition)
*endFilePosition = 0;
if (data == NULL) return PM3_EINVARG;

View file

@ -200,7 +200,7 @@ int loadFileDICTIONARY(const char *preferredName, void *data, size_t *datalen, u
* @return 0 for ok, 1 for failz
*/
int loadFileDICTIONARYEx(const char *preferredName, void *data, size_t maxdatalen, size_t *datalen, uint8_t keylen, uint16_t *keycnt,
size_t startFilePosition, size_t *endFilePosition, bool verbose);
size_t startFilePosition, size_t *endFilePosition, bool verbose);
/**
* @brief Utility function to load data safely from a DICTIONARY textfile. This method takes a preferred name.