mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
add white cloner pwdgen algo (thanks to @paleopterix!)
This commit is contained in:
parent
a32fbd21bd
commit
1aa9600048
4 changed files with 35 additions and 1 deletions
|
@ -414,12 +414,21 @@ int mfc_algo_sky_all(uint8_t *uid, uint8_t *keys) {
|
|||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
// LF T55x7 White gun cloner algo
|
||||
uint32_t lf_t55xx_white_pwdgen(uint32_t id) {
|
||||
uint32_t r1 = rotl(id & 0x000000ec, 8);
|
||||
uint32_t r2 = rotl(id & 0x86000000, 16);
|
||||
uint32_t pwd = 0x10303;
|
||||
pwd += ((id & 0x86ee00ec) ^ r1 ^ r2 );
|
||||
return pwd;
|
||||
}
|
||||
|
||||
//------------------------------------
|
||||
// Self tests
|
||||
//------------------------------------
|
||||
int generator_selftest(void) {
|
||||
|
||||
#define NUM_OF_TEST 5
|
||||
#define NUM_OF_TEST 6
|
||||
|
||||
PrintAndLogEx(INFO, "PWD / KEY generator selftest");
|
||||
PrintAndLogEx(INFO, "----------------------------");
|
||||
|
@ -468,6 +477,13 @@ int generator_selftest(void) {
|
|||
testresult++;
|
||||
PrintAndLogEx(success ? SUCCESS : WARNING, "UID | %s | %"PRIx64" - %s", sprint_hex(uid6, 4), key6, success ? "OK" : "->82C7E64BC565<--");
|
||||
|
||||
|
||||
uint32_t lf_id = lf_t55xx_white_pwdgen(0x00000080);
|
||||
success = (lf_id = 0x00018383);
|
||||
if (success)
|
||||
testresult++;
|
||||
PrintAndLogEx(success ? SUCCESS : WARNING, "ID | 0x00000080 | %08"PRIx32 " - %s", lf_id, success ? "OK" : "->00018383<--");
|
||||
|
||||
PrintAndLogEx(SUCCESS, "------------------- Selftest %s", (testresult == NUM_OF_TEST) ? "OK" : "fail");
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue