mirror of
https://github.com/jakcron/nstool
synced 2024-12-27 15:11:12 +00:00
[nstool] Cleaned up EsTikProcess string output.
This commit is contained in:
parent
08612d487e
commit
a6b6aec978
1 changed files with 4 additions and 9 deletions
|
@ -106,9 +106,7 @@ void EsTikProcess::verifyTicket()
|
|||
|
||||
void EsTikProcess::displayTicket()
|
||||
{
|
||||
#define _SPLIT_VER(ver) ( (ver>>10) & 0x3f), ( (ver>>4) & 0x3f), ( (ver>>0) & 0xf)
|
||||
#define _HEXDUMP_U(var, len) do { for (size_t a__a__A = 0; a__a__A < len; a__a__A++) printf("%02X", var[a__a__A]); } while(0)
|
||||
#define _HEXDUMP_L(var, len) do { for (size_t a__a__A = 0; a__a__A < len; a__a__A++) printf("%02x", var[a__a__A]); } while(0)
|
||||
#define _SPLIT_VER(ver) (uint32_t)((ver>>10) & 0x3f) << "." << (uint32_t)((ver>>4) & 0x3f) << "." << (uint32_t)((ver>>0) & 0xf)
|
||||
|
||||
const nn::es::TicketBody_V2& body = mTik.getBody();
|
||||
|
||||
|
@ -127,10 +125,10 @@ void EsTikProcess::displayTicket()
|
|||
size_t size = body.getTitleKeyEncType() == nn::es::ticket::RSA2048 ? fnd::rsa::kRsa2048Size : fnd::aes::kAes128KeySize;
|
||||
fnd::SimpleTextOutput::hexDump(body.getEncTitleKey(), size, 0x10, 6);
|
||||
|
||||
printf(" Version: v%d.%d.%d", _SPLIT_VER(body.getTicketVersion()));
|
||||
std::cout << " Version: v" << _SPLIT_VER(body.getTicketVersion());
|
||||
if (_HAS_BIT(mCliOutputMode, OUTPUT_EXTENDED))
|
||||
printf(" (%d)", body.getTicketVersion());
|
||||
printf("\n");
|
||||
std::cout << " (" << (uint32_t)body.getTicketVersion() << ")";
|
||||
std::cout << std::endl;
|
||||
|
||||
std::cout << " License Type: " << getLicenseTypeStr(body.getLicenseType()) << std::endl;
|
||||
|
||||
|
@ -163,9 +161,6 @@ void EsTikProcess::displayTicket()
|
|||
std::cout << " SectionNum: 0x" << std::hex << body.getSectionNum() << std::endl;
|
||||
std::cout << " SectionEntrySize: 0x" << std::hex << body.getSectionEntrySize() << std::endl;
|
||||
|
||||
|
||||
#undef _HEXDUMP_L
|
||||
#undef _HEXDUMP_U
|
||||
#undef _SPLIT_VER
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue