mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-31 04:39:49 +08:00
changed function name
This commit is contained in:
parent
ab5e4405fe
commit
fc3638a5f4
6 changed files with 13 additions and 13 deletions
|
@ -1037,8 +1037,8 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||||
em4x50_wipe((em4x50_data_t *)packet->data.asBytes);
|
em4x50_wipe((em4x50_data_t *)packet->data.asBytes);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CMD_LF_EM4X50_BRUTEFORCE: {
|
case CMD_LF_EM4X50_BRUTE: {
|
||||||
em4x50_bruteforce((em4x50_data_t *)packet->data.asBytes);
|
em4x50_brute((em4x50_data_t *)packet->data.asBytes);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,6 +22,6 @@ void em4x50_write(em4x50_data_t *etd);
|
||||||
void em4x50_write_password(em4x50_data_t *etd);
|
void em4x50_write_password(em4x50_data_t *etd);
|
||||||
void em4x50_read(em4x50_data_t *etd);
|
void em4x50_read(em4x50_data_t *etd);
|
||||||
void em4x50_wipe(em4x50_data_t *etd);
|
void em4x50_wipe(em4x50_data_t *etd);
|
||||||
void em4x50_bruteforce(em4x50_data_t *etd);
|
void em4x50_brute(em4x50_data_t *etd);
|
||||||
|
|
||||||
#endif /* EM4X50_H */
|
#endif /* EM4X50_H */
|
||||||
|
|
|
@ -1398,7 +1398,7 @@ static command_t CommandTable[] = {
|
||||||
{"4x50_write_password", CmdEM4x50WritePassword, IfPm3EM4x50, "change passwword of EM4x50 tag"},
|
{"4x50_write_password", CmdEM4x50WritePassword, IfPm3EM4x50, "change passwword of EM4x50 tag"},
|
||||||
{"4x50_read", CmdEM4x50Read, IfPm3EM4x50, "read word data from EM4x50"},
|
{"4x50_read", CmdEM4x50Read, IfPm3EM4x50, "read word data from EM4x50"},
|
||||||
{"4x50_wipe", CmdEM4x50Wipe, IfPm3EM4x50, "wipe data from EM4x50"},
|
{"4x50_wipe", CmdEM4x50Wipe, IfPm3EM4x50, "wipe data from EM4x50"},
|
||||||
{"4x50_bruteforce", CmdEM4x50BruteForce, IfPm3EM4x50, "guess password of EM4x50"},
|
{"4x50_brute", CmdEM4x50Brute, IfPm3EM4x50, "guess password of EM4x50"},
|
||||||
{NULL, NULL, NULL, NULL}
|
{NULL, NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -97,16 +97,16 @@ static int usage_lf_em4x50_wipe(void) {
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
static int usage_lf_em4x50_bruteforce(void) {
|
static int usage_lf_em4x50_brute(void) {
|
||||||
PrintAndLogEx(NORMAL, "Guess password of EM4x50 tag. Tag must be on antenna. ");
|
PrintAndLogEx(NORMAL, "Guess password of EM4x50 tag. Tag must be on antenna. ");
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
PrintAndLogEx(NORMAL, "Usage: lf em 4x50_bruteforce [h] f <pwd> l <pwd>");
|
PrintAndLogEx(NORMAL, "Usage: lf em 4x50_brute [h] f <pwd> l <pwd>");
|
||||||
PrintAndLogEx(NORMAL, "Options:");
|
PrintAndLogEx(NORMAL, "Options:");
|
||||||
PrintAndLogEx(NORMAL, " h - this help");
|
PrintAndLogEx(NORMAL, " h - this help");
|
||||||
PrintAndLogEx(NORMAL, " f <pwd> - start password (hex, lsb notation)");
|
PrintAndLogEx(NORMAL, " f <pwd> - start password (hex, lsb notation)");
|
||||||
PrintAndLogEx(NORMAL, " l <pwd> - stop password (hex, lsb notation)");
|
PrintAndLogEx(NORMAL, " l <pwd> - stop password (hex, lsb notation)");
|
||||||
PrintAndLogEx(NORMAL, "Examples:");
|
PrintAndLogEx(NORMAL, "Examples:");
|
||||||
PrintAndLogEx(NORMAL, _YELLOW_(" lf em 4x50_bruteforce f 11200000 l 11300000"));
|
PrintAndLogEx(NORMAL, _YELLOW_(" lf em 4x50_brute f 11200000 l 11300000"));
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -754,7 +754,7 @@ int CmdEM4x50Wipe(const char *Cmd) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdEM4x50BruteForce(const char *Cmd) {
|
int CmdEM4x50Brute(const char *Cmd) {
|
||||||
|
|
||||||
bool startpwd = false, stoppwd = false, errors = false;
|
bool startpwd = false, stoppwd = false, errors = false;
|
||||||
const int speed = 27; // 27 passwords/second (empirical value)
|
const int speed = 27; // 27 passwords/second (empirical value)
|
||||||
|
@ -767,7 +767,7 @@ int CmdEM4x50BruteForce(const char *Cmd) {
|
||||||
|
|
||||||
switch (tolower(param_getchar(Cmd, cmdp))) {
|
switch (tolower(param_getchar(Cmd, cmdp))) {
|
||||||
case 'h':
|
case 'h':
|
||||||
return usage_lf_em4x50_bruteforce();
|
return usage_lf_em4x50_brute();
|
||||||
case 'f':
|
case 'f':
|
||||||
etd.start_password = param_get32ex(Cmd, cmdp + 1, 0, 16);
|
etd.start_password = param_get32ex(Cmd, cmdp + 1, 0, 16);
|
||||||
startpwd = true;
|
startpwd = true;
|
||||||
|
@ -786,7 +786,7 @@ int CmdEM4x50BruteForce(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errors || !startpwd || !stoppwd)
|
if (errors || !startpwd || !stoppwd)
|
||||||
return usage_lf_em4x50_bruteforce();
|
return usage_lf_em4x50_brute();
|
||||||
|
|
||||||
// print some information
|
// print some information
|
||||||
no_iter = etd.stop_password - etd.start_password + 1;
|
no_iter = etd.stop_password - etd.start_password + 1;
|
||||||
|
@ -800,7 +800,7 @@ int CmdEM4x50BruteForce(const char *Cmd) {
|
||||||
|
|
||||||
// start
|
// start
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommandNG(CMD_LF_EM4X50_BRUTEFORCE, (uint8_t *)&etd, sizeof(etd));
|
SendCommandNG(CMD_LF_EM4X50_BRUTE, (uint8_t *)&etd, sizeof(etd));
|
||||||
WaitForResponse(CMD_ACK, &resp);
|
WaitForResponse(CMD_ACK, &resp);
|
||||||
|
|
||||||
// print response
|
// print response
|
||||||
|
|
|
@ -24,6 +24,6 @@ int CmdEM4x50WritePassword(const char *Cmd);
|
||||||
int CmdEM4x50Read(const char *Cmd);
|
int CmdEM4x50Read(const char *Cmd);
|
||||||
int CmdEM4x50Dump(const char *Cmd);
|
int CmdEM4x50Dump(const char *Cmd);
|
||||||
int CmdEM4x50Wipe(const char *Cmd);
|
int CmdEM4x50Wipe(const char *Cmd);
|
||||||
int CmdEM4x50BruteForce(const char *Cmd);
|
int CmdEM4x50Brute(const char *Cmd);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -493,7 +493,7 @@ typedef struct {
|
||||||
#define CMD_LF_EM4X50_WRITE_PASSWORD 0x0242
|
#define CMD_LF_EM4X50_WRITE_PASSWORD 0x0242
|
||||||
#define CMD_LF_EM4X50_READ 0x0243
|
#define CMD_LF_EM4X50_READ 0x0243
|
||||||
#define CMD_LF_EM4X50_WIPE 0x0244
|
#define CMD_LF_EM4X50_WIPE 0x0244
|
||||||
#define CMD_LF_EM4X50_BRUTEFORCE 0x0245
|
#define CMD_LF_EM4X50_BRUTE 0x0245
|
||||||
// Sampling configuration for LF reader/sniffer
|
// Sampling configuration for LF reader/sniffer
|
||||||
#define CMD_LF_SAMPLING_SET_CONFIG 0x021D
|
#define CMD_LF_SAMPLING_SET_CONFIG 0x021D
|
||||||
#define CMD_LF_FSK_SIMULATE 0x021E
|
#define CMD_LF_FSK_SIMULATE 0x021E
|
||||||
|
|
Loading…
Reference in a new issue