mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-09-04 19:54:39 +08:00
fix reveng -g to correctly take 1024 hexstring as input
This commit is contained in:
parent
7414cdf359
commit
2602661435
3 changed files with 10 additions and 6 deletions
|
@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
|
|||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||
|
||||
## [unreleased][unreleased]
|
||||
- Change `reveng -g` - now correctly take 1024 hexstring as input (@iceman1001)
|
||||
- Added `--override` parameter to NDEF read for overriding MAD CRC check (@iceman1001)
|
||||
- Added `hf saflok` commands (@stiebeljoshua)
|
||||
- Added `ntag_clean.lua` script for easier NTAG memory wipe (@trigat)
|
||||
|
|
|
@ -451,9 +451,11 @@ static int CmdrevengSearch(const char *Cmd) {
|
|||
|
||||
#define NMODELS 106
|
||||
|
||||
char inHexStr[256] = {0x00};
|
||||
char inHexStr[1024] = {0};
|
||||
int dataLen = param_getstr(Cmd, 0, inHexStr, sizeof(inHexStr));
|
||||
if (dataLen < 4) return 0;
|
||||
if (dataLen < 4) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// these two arrays, must match preset size.
|
||||
char *Models[NMODELS];
|
||||
|
@ -463,14 +465,15 @@ static int CmdrevengSearch(const char *Cmd) {
|
|||
char result[50 + 1] = {0};
|
||||
char revResult[50 + 1] = {0};
|
||||
int ans = GetModels(Models, &count, width);
|
||||
bool found = false;
|
||||
if (!ans) {
|
||||
if (ans == 0) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
free(Models[i]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
|
||||
str_lower(inHexStr);
|
||||
|
||||
// try each model and get result
|
||||
|
@ -576,7 +579,7 @@ static int CmdrevengSearch(const char *Cmd) {
|
|||
}
|
||||
|
||||
int CmdCrc(const char *Cmd) {
|
||||
char c[100 + 7];
|
||||
char c[1024 + 7];
|
||||
snprintf(c, sizeof(c), "reveng ");
|
||||
snprintf(c + strlen(c), sizeof(c) - strlen(c), Cmd, strlen(Cmd));
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ int MADCheck(uint8_t *sector0, uint8_t *sector16, bool verbose, bool *haveMAD2)
|
|||
|
||||
if (verbose && !res2) {
|
||||
PrintAndLogEx(SUCCESS, "CRC8...... 0x%02X ( %s )", sector16[0], _GREEN_("ok"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MA (multi-application card)
|
||||
|
|
Loading…
Add table
Reference in a new issue