simplify
This commit is contained in:
1 parent
77f49c8efc
commit
2551f9e0aa
1 file changed
+32
-16
+32
-16
@@ -682,8 +682,10 @@ void em4x50_login(uint32_t *password, bool ledcontrol) {
|
||||
int status = PM3_EFAILED;
|
||||
if (ledcontrol) LED_C_ON();
|
||||
if (get_signalproperties() && find_em4x50_tag()) {
|
||||
if (ledcontrol) LED_C_OFF();
|
||||
if (ledcontrol) LED_D_ON();
|
||||
if (ledcontrol) {
|
||||
LED_C_OFF();
|
||||
LED_D_ON();
|
||||
}
|
||||
status = login(*password);
|
||||
}
|
||||
|
||||
@@ -700,8 +702,10 @@ void em4x50_brute(em4x50_data_t *etd, bool ledcontrol) {
|
||||
uint32_t pwd = 0x0;
|
||||
if (ledcontrol) LED_C_ON();
|
||||
if (get_signalproperties() && find_em4x50_tag()) {
|
||||
if (ledcontrol) LED_C_OFF();
|
||||
if (ledcontrol) LED_D_ON();
|
||||
if (ledcontrol) {
|
||||
LED_C_OFF();
|
||||
LED_D_ON();
|
||||
}
|
||||
bsuccess = brute(etd->password1, etd->password2, &pwd);
|
||||
}
|
||||
|
||||
@@ -736,8 +740,10 @@ void em4x50_chk(uint8_t *filename, bool ledcontrol) {
|
||||
if (ledcontrol) LED_C_ON();
|
||||
if (get_signalproperties() && find_em4x50_tag()) {
|
||||
|
||||
if (ledcontrol) LED_C_OFF();
|
||||
if (ledcontrol) LED_D_ON();
|
||||
if (ledcontrol) {
|
||||
LED_C_OFF();
|
||||
LED_D_ON();
|
||||
}
|
||||
|
||||
// try to login with current password
|
||||
for (int i = 0; i < pwd_count; i++) {
|
||||
@@ -859,8 +865,10 @@ void em4x50_read(em4x50_data_t *etd, bool ledcontrol) {
|
||||
if (ledcontrol) LED_C_ON();
|
||||
if (get_signalproperties() && find_em4x50_tag()) {
|
||||
|
||||
if (ledcontrol) LED_C_OFF();
|
||||
if (ledcontrol) LED_D_ON();
|
||||
if (ledcontrol) {
|
||||
LED_C_OFF();
|
||||
LED_D_ON();
|
||||
}
|
||||
|
||||
bool blogin = true;
|
||||
|
||||
@@ -888,8 +896,10 @@ void em4x50_info(em4x50_data_t *etd, bool ledcontrol) {
|
||||
|
||||
if (ledcontrol) LED_C_ON();
|
||||
if (get_signalproperties() && find_em4x50_tag()) {
|
||||
if (ledcontrol) LED_C_OFF();
|
||||
if (ledcontrol) LED_D_ON();
|
||||
if (ledcontrol) {
|
||||
LED_C_OFF();
|
||||
LED_D_ON();
|
||||
}
|
||||
|
||||
bool blogin = true;
|
||||
// login with given password
|
||||
@@ -917,8 +927,10 @@ void em4x50_reader(bool ledcontrol) {
|
||||
|
||||
if (ledcontrol) LED_C_ON();
|
||||
if (get_signalproperties() && find_em4x50_tag()) {
|
||||
if (ledcontrol) LED_C_OFF();
|
||||
if (ledcontrol) LED_D_ON();
|
||||
if (ledcontrol) {
|
||||
LED_C_OFF();
|
||||
LED_D_ON();
|
||||
}
|
||||
standard_read(&now, words);
|
||||
}
|
||||
|
||||
@@ -1032,8 +1044,10 @@ void em4x50_write(em4x50_data_t *etd, bool ledcontrol) {
|
||||
if (ledcontrol) LED_C_ON();
|
||||
if (get_signalproperties() && find_em4x50_tag()) {
|
||||
|
||||
if (ledcontrol) LED_C_OFF();
|
||||
if (ledcontrol) LED_D_ON();
|
||||
if (ledcontrol) {
|
||||
LED_C_OFF();
|
||||
LED_D_ON();
|
||||
}
|
||||
|
||||
// if password is given try to login first
|
||||
status = PM3_SUCCESS;
|
||||
@@ -1089,8 +1103,10 @@ void em4x50_writepwd(em4x50_data_t *etd, bool ledcontrol) {
|
||||
if (ledcontrol) LED_C_ON();
|
||||
if (get_signalproperties() && find_em4x50_tag()) {
|
||||
|
||||
if (ledcontrol) LED_C_OFF();
|
||||
if (ledcontrol) LED_D_ON();
|
||||
if (ledcontrol) {
|
||||
LED_C_OFF();
|
||||
LED_D_ON();
|
||||
}
|
||||
|
||||
// login and change password
|
||||
if (login(etd->password1) == PM3_SUCCESS) {
|
||||
|
||||
Reference in new issue
Block a user