From fc3638a5f4eee9b6c7f068bdef8e3f088467a041 Mon Sep 17 00:00:00 2001 From: tharexde Date: Sun, 27 Sep 2020 13:42:27 +0200 Subject: [PATCH] changed function name --- armsrc/appmain.c | 4 ++-- armsrc/em4x50.h | 2 +- client/src/cmdlfem4x.c | 2 +- client/src/cmdlfem4x50.c | 14 +++++++------- client/src/cmdlfem4x50.h | 2 +- include/pm3_cmd.h | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 88523aa6c..5a465c2bd 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -1037,8 +1037,8 @@ static void PacketReceived(PacketCommandNG *packet) { em4x50_wipe((em4x50_data_t *)packet->data.asBytes); break; } - case CMD_LF_EM4X50_BRUTEFORCE: { - em4x50_bruteforce((em4x50_data_t *)packet->data.asBytes); + case CMD_LF_EM4X50_BRUTE: { + em4x50_brute((em4x50_data_t *)packet->data.asBytes); break; } #endif diff --git a/armsrc/em4x50.h b/armsrc/em4x50.h index 71e1371f6..db8235bca 100644 --- a/armsrc/em4x50.h +++ b/armsrc/em4x50.h @@ -22,6 +22,6 @@ void em4x50_write(em4x50_data_t *etd); void em4x50_write_password(em4x50_data_t *etd); void em4x50_read(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 */ diff --git a/client/src/cmdlfem4x.c b/client/src/cmdlfem4x.c index efc0bb322..b09f2f102 100644 --- a/client/src/cmdlfem4x.c +++ b/client/src/cmdlfem4x.c @@ -1398,7 +1398,7 @@ static command_t CommandTable[] = { {"4x50_write_password", CmdEM4x50WritePassword, IfPm3EM4x50, "change passwword of EM4x50 tag"}, {"4x50_read", CmdEM4x50Read, IfPm3EM4x50, "read word 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} }; diff --git a/client/src/cmdlfem4x50.c b/client/src/cmdlfem4x50.c index a87ec2927..c0fc06e7b 100644 --- a/client/src/cmdlfem4x50.c +++ b/client/src/cmdlfem4x50.c @@ -97,16 +97,16 @@ static int usage_lf_em4x50_wipe(void) { PrintAndLogEx(NORMAL, ""); 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, ""); - PrintAndLogEx(NORMAL, "Usage: lf em 4x50_bruteforce [h] f l "); + PrintAndLogEx(NORMAL, "Usage: lf em 4x50_brute [h] f l "); PrintAndLogEx(NORMAL, "Options:"); PrintAndLogEx(NORMAL, " h - this help"); PrintAndLogEx(NORMAL, " f - start password (hex, lsb notation)"); PrintAndLogEx(NORMAL, " l - stop password (hex, lsb notation)"); 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, ""); return PM3_SUCCESS; } @@ -754,7 +754,7 @@ int CmdEM4x50Wipe(const char *Cmd) { return PM3_SUCCESS; } -int CmdEM4x50BruteForce(const char *Cmd) { +int CmdEM4x50Brute(const char *Cmd) { bool startpwd = false, stoppwd = false, errors = false; const int speed = 27; // 27 passwords/second (empirical value) @@ -767,7 +767,7 @@ int CmdEM4x50BruteForce(const char *Cmd) { switch (tolower(param_getchar(Cmd, cmdp))) { case 'h': - return usage_lf_em4x50_bruteforce(); + return usage_lf_em4x50_brute(); case 'f': etd.start_password = param_get32ex(Cmd, cmdp + 1, 0, 16); startpwd = true; @@ -786,7 +786,7 @@ int CmdEM4x50BruteForce(const char *Cmd) { } if (errors || !startpwd || !stoppwd) - return usage_lf_em4x50_bruteforce(); + return usage_lf_em4x50_brute(); // print some information no_iter = etd.stop_password - etd.start_password + 1; @@ -800,7 +800,7 @@ int CmdEM4x50BruteForce(const char *Cmd) { // start 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); // print response diff --git a/client/src/cmdlfem4x50.h b/client/src/cmdlfem4x50.h index 6e1815c87..9a86adfed 100644 --- a/client/src/cmdlfem4x50.h +++ b/client/src/cmdlfem4x50.h @@ -24,6 +24,6 @@ int CmdEM4x50WritePassword(const char *Cmd); int CmdEM4x50Read(const char *Cmd); int CmdEM4x50Dump(const char *Cmd); int CmdEM4x50Wipe(const char *Cmd); -int CmdEM4x50BruteForce(const char *Cmd); +int CmdEM4x50Brute(const char *Cmd); #endif diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index f97be2a06..69a75a1ad 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -493,7 +493,7 @@ typedef struct { #define CMD_LF_EM4X50_WRITE_PASSWORD 0x0242 #define CMD_LF_EM4X50_READ 0x0243 #define CMD_LF_EM4X50_WIPE 0x0244 -#define CMD_LF_EM4X50_BRUTEFORCE 0x0245 +#define CMD_LF_EM4X50_BRUTE 0x0245 // Sampling configuration for LF reader/sniffer #define CMD_LF_SAMPLING_SET_CONFIG 0x021D #define CMD_LF_FSK_SIMULATE 0x021E