mirror of
https://github.com/naehrwert/scetool.git
synced 2025-04-24 13:47:47 +00:00
Header parser fix 2
Another minor update
This commit is contained in:
parent
e5bb42387f
commit
10204bc16c
4 changed files with 28 additions and 10 deletions
Binary file not shown.
|
@ -57,7 +57,9 @@ void _print_metadata_info(FILE *fp, metadata_info_t *mi)
|
|||
{
|
||||
fprintf(fp, "[*] Encryption Root Header:\n");
|
||||
_hexdump(fp, " Key", 0, mi->key, METADATA_INFO_KEY_LEN, FALSE);
|
||||
_hexdump(fp, " ", 0, mi->key_pad, METADATA_INFO_KEY_LEN, FALSE);
|
||||
_hexdump(fp, " IV ", 0, mi->iv, METADATA_INFO_IV_LEN, FALSE);
|
||||
_hexdump(fp, " ", 0, mi->iv_pad, METADATA_INFO_IV_LEN, FALSE);
|
||||
}
|
||||
|
||||
void _print_metadata_header(FILE *fp, metadata_header_t *mh)
|
||||
|
|
|
@ -81,6 +81,8 @@
|
|||
#define OPT_HEADER_TYPE_CAP_FLAGS 1
|
||||
/*! Individuals seed header. */
|
||||
#define OPT_HEADER_TYPE_INDIV_SEED 2
|
||||
/*! Optional header 4. */
|
||||
#define OPT_HEADER_TYPE_4 4
|
||||
|
||||
/*! Metadata key/iv lengths. */
|
||||
#define METADATA_INFO_KEYBITS 128
|
||||
|
|
34
src/self.cpp
34
src/self.cpp
|
@ -296,21 +296,29 @@ void _print_opt_header(FILE *fp, opt_header_t *oh)
|
|||
{
|
||||
case OPT_HEADER_TYPE_CAP_FLAGS:
|
||||
{
|
||||
oh_data_cap_flags_t *cf = (oh_data_cap_flags_t *)((u8 *)oh + sizeof(opt_header_t));
|
||||
if (_ES32(oh->size) == 0x30)
|
||||
{
|
||||
oh_data_cap_flags_t *cf = (oh_data_cap_flags_t *)((u8 *)oh + sizeof(opt_header_t));
|
||||
|
||||
_IF_RAW(_hexdump(fp, " Flags", 0, (u8 *)cf, sizeof(oh_data_cap_flags_t), FALSE));
|
||||
_IF_RAW(_hexdump(fp, " Flags", 0, (u8 *)cf, sizeof(oh_data_cap_flags_t), FALSE));
|
||||
|
||||
// _es_oh_data_cap_flags(cf);
|
||||
// _es_oh_data_cap_flags(cf);
|
||||
|
||||
fprintf(fp, " unknown_3 0x%016llX\n", _ES64(cf->unk3));
|
||||
fprintf(fp, " unknown_4 0x%016llX\n", _ES64(cf->unk4));
|
||||
fprintf(fp, " unknown_3 0x%016llX\n", _ES64(cf->unk3));
|
||||
fprintf(fp, " unknown_4 0x%016llX\n", _ES64(cf->unk4));
|
||||
|
||||
fprintf(fp, " Flags 0x%016llX [ ", _ES64(cf->flags));
|
||||
_print_cap_flags_flags(fp, cf);
|
||||
fprintf(fp, "]\n");
|
||||
fprintf(fp, " Flags 0x%016llX [ ", _ES64(cf->flags));
|
||||
_print_cap_flags_flags(fp, cf);
|
||||
fprintf(fp, "]\n");
|
||||
|
||||
fprintf(fp, " unknown_6 0x%08X\n", _ES32(cf->unk6));
|
||||
fprintf(fp, " unknown_7 0x%08X\n", _ES32(cf->unk7));
|
||||
fprintf(fp, " unknown_6 0x%08X\n", _ES32(cf->unk6));
|
||||
fprintf(fp, " unknown_7 0x%08X\n", _ES32(cf->unk7));
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 *h1 = (u8 *)oh + sizeof(opt_header_t);
|
||||
_hexdump(fp, " Data", 0, h1, _ES32(oh->size) - sizeof(opt_header_t), FALSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case OPT_HEADER_TYPE_INDIV_SEED:
|
||||
|
@ -319,6 +327,12 @@ void _print_opt_header(FILE *fp, opt_header_t *oh)
|
|||
_hexdump(fp, " Seed", 0, is, _ES32(oh->size) - sizeof(opt_header_t), FALSE);
|
||||
}
|
||||
break;
|
||||
case OPT_HEADER_TYPE_4:
|
||||
{
|
||||
u8 *h4 = (u8 *)oh + sizeof(opt_header_t);
|
||||
_hexdump(fp, " Data", 0, h4, _ES32(oh->size) - sizeof(opt_header_t), FALSE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue