Merge branch 'RfidResearchGroup:master' into master
This commit is contained in:
6 files changed
+69
-43
No files matched your search
@@ -2329,7 +2329,7 @@ static int CmdHFiClass_WriteBlock(const char *Cmd) {
|
||||
arg_lit0(NULL, "credit", "key is assumed to be the credit key"),
|
||||
arg_lit0(NULL, "elite", "elite computations applied to key"),
|
||||
arg_lit0(NULL, "raw", "no computations applied to key"),
|
||||
arg_lit0(NULL, "nr", "replay of NR/MAC"),
|
||||
arg_lit0(NULL, "nr", "replay of NR/MAC block write or use privilege escalation if mac is empty"),
|
||||
arg_lit0("v", "verbose", "verbose output"),
|
||||
arg_lit0(NULL, "shallow", "use shallow (ASK) reader modulation instead of OOK"),
|
||||
arg_param_end
|
||||
|
||||
@@ -267,7 +267,7 @@ static void ParseAndPrintSaflokData(const sector_t *sector0_info, const sector_t
|
||||
uint16_t property_id = ((decodedBA[14] & 0x0F) << 8) | decodedBA[15];
|
||||
|
||||
// Bytes 11-13: Creation date since SAFLOK_YEAR_OFFSET Jan 1st
|
||||
uint16_t creation_year = (((decodedBA[11] & 0xF0) >> 4) + SAFLOK_YEAR_OFFSET) | creation_year_high_bits;
|
||||
uint16_t creation_year = (creation_year_high_bits | (decodedBA[11] >> 4)) + SAFLOK_YEAR_OFFSET;
|
||||
uint8_t creation_month = decodedBA[11] & 0x0F;
|
||||
uint8_t creation_day = (decodedBA[12] >> 3) & 0x1F;
|
||||
uint8_t creation_hour = ((decodedBA[12] & 0x07) << 2) | ((decodedBA[13] & 0xC0) >> 6);
|
||||
@@ -329,7 +329,7 @@ static void ParseAndPrintSaflokData(const sector_t *sector0_info, const sector_t
|
||||
bool checksum_valid = (checksum_calculated == checksum);
|
||||
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(INFO, "--- " _CYAN_("SAFLOK details"));
|
||||
PrintAndLogEx(INFO, "--- " _CYAN_("Saflok details"));
|
||||
PrintAndLogEx(SUCCESS, "Key Level............. %u (%s)", saflok_key_levels[key_level].level_num, saflok_key_levels[key_level].level_name);
|
||||
PrintAndLogEx(SUCCESS, "LED Warning........... %s", led_warning ? "Yes" : "No");
|
||||
PrintAndLogEx(SUCCESS, "Key ID................ %u (0x%02X)", key_id, key_id);
|
||||
|
||||
+15
-1
@@ -698,8 +698,13 @@ int flash_write(flash_file_t *ctx) {
|
||||
|
||||
PrintAndLogEx(SUCCESS, " 0x%08x..0x%08x [0x%x / %u blocks]", seg->start, end - 1, length, blocks);
|
||||
if (is_loaded) {
|
||||
fprintf(stdout, "\n\n");
|
||||
if (blocks < 50) {
|
||||
PrintAndLogEx(SUCCESS, "" NOLF);
|
||||
} else {
|
||||
fprintf(stdout, "\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
int block = 0;
|
||||
uint8_t *data = seg->data;
|
||||
@@ -721,6 +726,15 @@ int flash_write(flash_file_t *ctx) {
|
||||
length -= block_size;
|
||||
block++;
|
||||
|
||||
// small files, like bootrom
|
||||
if (blocks < 50) {
|
||||
fprintf(stdout, ".");
|
||||
len++;
|
||||
fflush(stdout);
|
||||
continue;
|
||||
}
|
||||
|
||||
// large fullimage write
|
||||
if (is_loaded) {
|
||||
if (len < ice3len) {
|
||||
fprintf(stdout, "%c", ice3[len++]);
|
||||
|
||||
Reference in new issue
Block a user