mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
Allow writes up to 256 bytes with mfdes writedata
And change help text to say 256 instead of 0xFFFF. Closes #977
This commit is contained in:
parent
65ec981eb4
commit
9c5c00d620
2 changed files with 4 additions and 4 deletions
|
@ -152,7 +152,7 @@ int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
|
||||||
*datalen = 0;
|
*datalen = 0;
|
||||||
|
|
||||||
int ibuf = 0;
|
int ibuf = 0;
|
||||||
uint8_t tmp_buf[256] = {0};
|
uint8_t tmp_buf[512] = {0};
|
||||||
int res = CLIParamStrToBuf(argstr, tmp_buf, maxdatalen * 2, &ibuf); // *2 because here HEX
|
int res = CLIParamStrToBuf(argstr, tmp_buf, maxdatalen * 2, &ibuf); // *2 because here HEX
|
||||||
if (res) {
|
if (res) {
|
||||||
printf("Parameter error: buffer overflow.\n");
|
printf("Parameter error: buffer overflow.\n");
|
||||||
|
@ -186,7 +186,7 @@ int CLIParamStrToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
|
||||||
if (!argstr->count)
|
if (!argstr->count)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
uint8_t tmp_buf[256] = {0};
|
uint8_t tmp_buf[512] = {0};
|
||||||
int ibuf = 0;
|
int ibuf = 0;
|
||||||
|
|
||||||
for (int i = 0; i < argstr->count; i++) {
|
for (int i = 0; i < argstr->count; i++) {
|
||||||
|
|
|
@ -2851,9 +2851,9 @@ static int CmdHF14ADesWriteData(const char *Cmd) {
|
||||||
arg_param_begin,
|
arg_param_begin,
|
||||||
arg_strx0("nN", "fileno", "<fileno>", "File Number (1 hex byte, 0x00 - 0x1F)"),
|
arg_strx0("nN", "fileno", "<fileno>", "File Number (1 hex byte, 0x00 - 0x1F)"),
|
||||||
arg_strx0("oO", "offset", "<offset>", "File Offset (3 hex bytes, big endian), optional"),
|
arg_strx0("oO", "offset", "<offset>", "File Offset (3 hex bytes, big endian), optional"),
|
||||||
arg_strx0("dD", "data", "<data>", "Data to write (hex bytes, 0xFFFF bytes max.)"),
|
arg_strx0("dD", "data", "<data>", "Data to write (hex bytes, 256 bytes max)"),
|
||||||
arg_int0("type", "type", "<type>", "File Type (0=Standard/Backup, 1=Record)"),
|
arg_int0("type", "type", "<type>", "File Type (0=Standard/Backup, 1=Record)"),
|
||||||
arg_strx0("aA", "aid", "<aid>", "App ID to select as hex bytes (3 bytes,big endian, optional)"),
|
arg_strx0("aA", "aid", "<aid>", "App ID to select as hex bytes (3 bytes, big endian, optional)"),
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue