mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-05 20:41:34 -07:00
add PM3_REASON_UNKNOWN
This commit is contained in:
parent
cd4c2834a6
commit
9a50e608e0
3 changed files with 7 additions and 4 deletions
|
@ -138,7 +138,7 @@ static int reply_ng_internal(uint16_t cmd, int8_t status, uint8_t reason, const
|
|||
}
|
||||
|
||||
int reply_ng(uint16_t cmd, int8_t status, const uint8_t *data, size_t len) {
|
||||
return reply_ng_internal(cmd, status, -1, data, len, true);
|
||||
return reply_ng_internal(cmd, status, PM3_REASON_UNKNOWN, data, len, true);
|
||||
}
|
||||
|
||||
int reply_mix(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, const void *data, size_t len) {
|
||||
|
@ -154,7 +154,7 @@ int reply_mix(uint64_t cmd, uint64_t arg0, uint64_t arg1, uint64_t arg2, const v
|
|||
memcpy(cmddata + sizeof(arg), data, (int)len);
|
||||
}
|
||||
|
||||
return reply_ng_internal((cmd & 0xFFFF), status, -1, cmddata, len + sizeof(arg), false);
|
||||
return reply_ng_internal((cmd & 0xFFFF), status, PM3_REASON_UNKNOWN, cmddata, len + sizeof(arg), false);
|
||||
}
|
||||
|
||||
int reply_reason(uint16_t cmd, int8_t status, int8_t reason, const uint8_t *data, size_t len) {
|
||||
|
|
|
@ -210,7 +210,8 @@ static void print_error(int8_t reason) {
|
|||
PrintAndLogEx(FAILED, "Write to page failed!");
|
||||
break;
|
||||
default:
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Hitag S failed");
|
||||
// PM3_REASON_UNKNOWN
|
||||
PrintAndLogEx(DEBUG, "DEBUG: Error - Hitag S failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -237,7 +238,7 @@ static int CmdLFHitagSRead(const char *Cmd) {
|
|||
arg_lit0(NULL, "crypto", "crypto mode"),
|
||||
arg_str0("k", "key", "<hex>", "pwd or key, 4 or 6 hex bytes"),
|
||||
arg_int0("p", "page", "<dec>", "page address to read from"),
|
||||
arg_int0("c", "count", "<dec>", "how many pages to read. '0' reads all pages up to the s page (default: 1)"),
|
||||
arg_int0("c", "count", "<dec>", "how many pages to read. '0' reads all pages up to the end page (default: 1)"),
|
||||
arg_param_end
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||
|
|
|
@ -874,6 +874,8 @@ typedef struct {
|
|||
// reserved for future protocol change
|
||||
#define PM3_RESERVED -128
|
||||
|
||||
#define PM3_REASON_UNKNOWN -1
|
||||
|
||||
// LF
|
||||
#define LF_FREQ2DIV(f) ((int)(((12000.0 + (f)/2.0)/(f))-1))
|
||||
#define LF_DIVISOR_125 LF_FREQ2DIV(125)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue