mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-25 00:25:48 +08:00
delated watch function (em4x50)
This commit is contained in:
parent
e6eb6af9e3
commit
f03fac540a
7 changed files with 0 additions and 75 deletions
|
@ -1120,10 +1120,6 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||||
em4x50_reset();
|
em4x50_reset();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CMD_LF_EM4X50_WATCH: {
|
|
||||||
em4x50_watch();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CMD_LF_EM4X50_RESTORE: {
|
case CMD_LF_EM4X50_RESTORE: {
|
||||||
em4x50_restore((em4x50_data_t *)packet->data.asBytes);
|
em4x50_restore((em4x50_data_t *)packet->data.asBytes);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1155,42 +1155,6 @@ void em4x50_reader(void) {
|
||||||
reply_ng(CMD_LF_EM4X50_READER, now, (uint8_t *)words, 4 * now);
|
reply_ng(CMD_LF_EM4X50_READER, now, (uint8_t *)words, 4 * now);
|
||||||
}
|
}
|
||||||
|
|
||||||
void em4x50_watch() {
|
|
||||||
|
|
||||||
// read continuously and display standard reads of tag
|
|
||||||
|
|
||||||
int now = 0;
|
|
||||||
uint32_t words[EM4X50_NO_WORDS] = {0x0};
|
|
||||||
|
|
||||||
em4x50_setup_read();
|
|
||||||
|
|
||||||
while (BUTTON_PRESS() == false) {
|
|
||||||
|
|
||||||
WDT_HIT();
|
|
||||||
memset(words, 0, sizeof(words));
|
|
||||||
now = 0;
|
|
||||||
|
|
||||||
if (get_signalproperties() && find_em4x50_tag()) {
|
|
||||||
|
|
||||||
if (standard_read(&now, words) == PM3_EOPABORTED)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (now > 0) {
|
|
||||||
|
|
||||||
Dbprintf("");
|
|
||||||
for (int i = 0; i < now; i++)
|
|
||||||
Dbprintf("EM4x50 tag data: "
|
|
||||||
_GREEN_("%08x") " (msb) - " _GREEN_("%08x") " (lsb)",
|
|
||||||
words[i], reflect32(words[i]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LOW(GPIO_SSC_DOUT);
|
|
||||||
lf_finalize();
|
|
||||||
reply_ng(CMD_LF_EM4X50_WATCH, 1, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// write functions
|
// write functions
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
|
@ -26,7 +26,6 @@ void em4x50_read(em4x50_data_t *etd);
|
||||||
void em4x50_brute(em4x50_data_t *etd);
|
void em4x50_brute(em4x50_data_t *etd);
|
||||||
void em4x50_login(uint32_t *password);
|
void em4x50_login(uint32_t *password);
|
||||||
void em4x50_reset(void);
|
void em4x50_reset(void);
|
||||||
void em4x50_watch(void);
|
|
||||||
void em4x50_restore(em4x50_data_t *etd);
|
void em4x50_restore(em4x50_data_t *etd);
|
||||||
void em4x50_sim(void);
|
void em4x50_sim(void);
|
||||||
void em4x50_reader(void);
|
void em4x50_reader(void);
|
||||||
|
|
|
@ -661,7 +661,6 @@ static command_t CommandTable[] = {
|
||||||
{"4x50_brute", CmdEM4x50Brute, IfPm3EM4x50, "guess password of EM4x50"},
|
{"4x50_brute", CmdEM4x50Brute, IfPm3EM4x50, "guess password of EM4x50"},
|
||||||
{"4x50_login", CmdEM4x50Login, IfPm3EM4x50, "login into EM4x50"},
|
{"4x50_login", CmdEM4x50Login, IfPm3EM4x50, "login into EM4x50"},
|
||||||
{"4x50_reset", CmdEM4x50Reset, IfPm3EM4x50, "reset EM4x50"},
|
{"4x50_reset", CmdEM4x50Reset, IfPm3EM4x50, "reset EM4x50"},
|
||||||
{"4x50_watch", CmdEM4x50Watch, IfPm3EM4x50, "watch for EM4x50 tags"},
|
|
||||||
{"4x50_restore",CmdEM4x50Restore, IfPm3EM4x50, "restore EM4x50 dump to tag"},
|
{"4x50_restore",CmdEM4x50Restore, IfPm3EM4x50, "restore EM4x50 dump to tag"},
|
||||||
{"4x50_sim", CmdEM4x50Sim, IfPm3EM4x50, "simulate EM4x50 tag"},
|
{"4x50_sim", CmdEM4x50Sim, IfPm3EM4x50, "simulate EM4x50 tag"},
|
||||||
{"4x50_reader", CmdEM4x50Reader, IfPm3EM4x50, "show standard read mode data of EM4x50"},
|
{"4x50_reader", CmdEM4x50Reader, IfPm3EM4x50, "show standard read mode data of EM4x50"},
|
||||||
|
|
|
@ -819,37 +819,6 @@ int CmdEM4x50Reader(const char *Cmd) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdEM4x50Watch(const char *Cmd) {
|
|
||||||
|
|
||||||
// continously envoke reading of a EM4x50 tag
|
|
||||||
|
|
||||||
PacketResponseNG resp;
|
|
||||||
|
|
||||||
CLIParserContext *ctx;
|
|
||||||
CLIParserInit(&ctx, "lf em 4x50_watch",
|
|
||||||
"Watches for EM4x50 tags. Function runs until button is pressed.",
|
|
||||||
"lf em 4x50_watch\n"
|
|
||||||
);
|
|
||||||
|
|
||||||
void *argtable[] = {
|
|
||||||
arg_param_begin,
|
|
||||||
arg_param_end
|
|
||||||
};
|
|
||||||
|
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
|
||||||
CLIParserFree(ctx);
|
|
||||||
|
|
||||||
PrintAndLogEx(SUCCESS, "Watching for EM4x50 cards - place tag on antenna");
|
|
||||||
PrintAndLogEx(INFO, "You can cancel this operation by pressing the pm3 button");
|
|
||||||
|
|
||||||
clearCommandBuffer();
|
|
||||||
SendCommandNG(CMD_LF_EM4X50_WATCH, 0, 0);
|
|
||||||
WaitForResponseTimeoutW(CMD_LF_EM4X50_WATCH, &resp, -1, false);
|
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "Done");
|
|
||||||
return PM3_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
int CmdEM4x50Dump(const char *Cmd) {
|
int CmdEM4x50Dump(const char *Cmd) {
|
||||||
|
|
||||||
int fnLen = 0, pwdLen = 0, status = 0;
|
int fnLen = 0, pwdLen = 0, status = 0;
|
||||||
|
|
|
@ -26,7 +26,6 @@ int CmdEM4x50Wipe(const char *Cmd);
|
||||||
int CmdEM4x50Brute(const char *Cmd);
|
int CmdEM4x50Brute(const char *Cmd);
|
||||||
int CmdEM4x50Login(const char *Cmd);
|
int CmdEM4x50Login(const char *Cmd);
|
||||||
int CmdEM4x50Reset(const char *Cmd);
|
int CmdEM4x50Reset(const char *Cmd);
|
||||||
int CmdEM4x50Watch(const char *Cmd);
|
|
||||||
int CmdEM4x50Restore(const char *Cmd);
|
int CmdEM4x50Restore(const char *Cmd);
|
||||||
int CmdEM4x50Sim(const char *Cmd);
|
int CmdEM4x50Sim(const char *Cmd);
|
||||||
int CmdEM4x50Reader(const char *Cmd);
|
int CmdEM4x50Reader(const char *Cmd);
|
||||||
|
|
|
@ -510,7 +510,6 @@ typedef struct {
|
||||||
#define CMD_LF_EM4X50_BRUTE 0x0245
|
#define CMD_LF_EM4X50_BRUTE 0x0245
|
||||||
#define CMD_LF_EM4X50_LOGIN 0x0246
|
#define CMD_LF_EM4X50_LOGIN 0x0246
|
||||||
#define CMD_LF_EM4X50_RESET 0x0247
|
#define CMD_LF_EM4X50_RESET 0x0247
|
||||||
#define CMD_LF_EM4X50_WATCH 0x0248
|
|
||||||
#define CMD_LF_EM4X50_RESTORE 0x0249
|
#define CMD_LF_EM4X50_RESTORE 0x0249
|
||||||
#define CMD_LF_EM4X50_SIM 0x0250
|
#define CMD_LF_EM4X50_SIM 0x0250
|
||||||
#define CMD_LF_EM4X50_READER 0x0251
|
#define CMD_LF_EM4X50_READER 0x0251
|
||||||
|
|
Loading…
Reference in a new issue