projects
/
proxmark3-svn
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CHG: NEDAP, changed back the preamble. With new parity check it has a decent detec...
[proxmark3-svn]
/
client
/
cmdlfem4x.c
diff --git
a/client/cmdlfem4x.c
b/client/cmdlfem4x.c
index 61b7047df83116e4534861cbe81f83959c964aad..1bcc384a50a8cc8d739265a62b4897ed0c5c9a6a 100644
(file)
--- a/
client/cmdlfem4x.c
+++ b/
client/cmdlfem4x.c
@@
-11,17
+11,7
@@
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
-#include "proxmark3.h"
-#include "ui.h"
-#include "util.h"
-#include "graph.h"
-#include "cmdparser.h"
-#include "cmddata.h"
-#include "cmdlf.h"
#include "cmdlfem4x.h"
#include "cmdlfem4x.h"
-#include "lfdemod.h"
-
-#define llx PRIx64
char *global_em410xId;
char *global_em410xId;
@@
-58,7
+48,8
@@
int CmdEM410xRead(const char *Cmd)
return 0;
}
char id[12] = {0x00};
return 0;
}
char id[12] = {0x00};
- sprintf(id, "%010llx",lo);
+ //sprintf(id, "%010llx",lo);
+ sprintf(id, "%010"PRIu64, lo);
global_em410xId = id;
return 1;
global_em410xId = id;
return 1;
@@
-173,7
+164,7
@@
int CmdEM410xWrite(const char *Cmd)
{
uint64_t id = 0xFFFFFFFFFFFFFFFF; // invalid id value
int card = 0xFF; // invalid card value
{
uint64_t id = 0xFFFFFFFFFFFFFFFF; // invalid id value
int card = 0xFF; // invalid card value
- u
nsigned in
t clock = 0; // invalid clock value
+ u
int32_
t clock = 0; // invalid clock value
sscanf(Cmd, "%" PRIx64 " %d %d", &id, &card, &clock);
sscanf(Cmd, "%" PRIx64 " %d %d", &id, &card, &clock);
@@
-199,8
+190,8
@@
int CmdEM410xWrite(const char *Cmd)
// Check Clock
// Default: 64
// Check Clock
// Default: 64
-
if (clock == 0)
-
clock = 64;
+ if (clock == 0)
+ clock = 64;
// Allowed clock rates: 16, 32, 40 and 64
if ((clock != 16) && (clock != 32) && (clock != 64) && (clock != 40)) {
// Allowed clock rates: 16, 32, 40 and 64
if ((clock != 16) && (clock != 32) && (clock != 64) && (clock != 40)) {
@@
-225,7
+216,6
@@
int CmdEM410xWrite(const char *Cmd)
UsbCommand c = {CMD_EM410X_WRITE_TAG, {card, (uint32_t)(id >> 32), (uint32_t)id}};
SendCommand(&c);
UsbCommand c = {CMD_EM410X_WRITE_TAG, {card, (uint32_t)(id >> 32), (uint32_t)id}};
SendCommand(&c);
-
return 0;
}
return 0;
}
@@
-613,14
+603,13
@@
static command_t CommandTable[] =
{NULL, NULL, 0, NULL}
};
{NULL, NULL, 0, NULL}
};
-int CmdLFEM4X(const char *Cmd)
-{
+int CmdLFEM4X(const char *Cmd)
{
+ clearCommandBuffer();
CmdsParse(CommandTable, Cmd);
return 0;
}
CmdsParse(CommandTable, Cmd);
return 0;
}
-int CmdHelp(const char *Cmd)
-{
+int CmdHelp(const char *Cmd) {
CmdsHelp(CommandTable);
return 0;
}
CmdsHelp(CommandTable);
return 0;
}
Impressum
,
Datenschutz