Godmode9: [REQUEST] [SCRIPTING] Extract encTitleKey.bin via script

Created on 10 Apr 2018  路  16Comments  路  Source: d0k3/GodMode9

Could the ability to extract enctitlekey.bin from ticket.db with a script be implemented? It was a really helpful feature of d9. And it doesn't seem like it would be too hard to implement, considering this can be done manually.

feature request

All 16 comments

I think what he鈥檚 asking for is the ability to dump Support Files via a scripting command. Also, it should be possible to extract DIFF data via a scripting command.

Re-posted here as GM9 scripters over there may be able to better help you.

I'll think about it, I have my doubts, though. Implementation wise, this is a little harder than one might suspect.

@SirNapkin1334 - extracting DIFF partition via a script: once I've got a use case for that.

Alright, I can give you a way of building decTitleKeyInfo.bin, encTitleKeyInfo.bin and seeddb.bin from a script. Problem(?): All three files would have to go into the standard output dir (0:/gm9/out), which would also mean there would be a prompt if any of them already exists. Otherwise bigger changes to the code would be required.

I'd also prefer all of that being handled by one scripting command, building all of them at once. Does that sound acceptable?

Sure, is encTitleKeyInfo.bin the same as encTitleKeys.bin?

@d0k3 now, I'm not a scripter, but I would think ideally you could have the option to dump only one of them or all three of them. My idea: sdump
sdump is simple to use.
You can use -e for building encTitleKey, -d for decTitleKey, -s for seeddb, and -a for all of them at once. Normally it builds to 0:/gm9/out, however with -p (meaning "path" since the path is changed) it builds to 0:/gm9/support. You don't have to implement the last one, tbh I don't see many use cases for it, but the first four make sense to me.

Also, in scripting, completely unrelated, but perhaps we could be able to execute 2+ commands on one line? Like && in bash, for example mkdir test && cd test. Again, not that many use cases, but you could compress scripts into fewer lines better.

That is brilliant!!! The path option also seems super handy!

Yeah, as I said. All of what @SirNapkin1334 mentioned would only make things a lot more complicated. Especially the two commands in one line thing ;). I can think about making these files dumpable separately.

Building to 0:/gm9/support makes no sense at all, btw. You already got these titlekeys / seeds on your system, so why also provide them externally?

Okay, @trainboy2019 - can you test the sdump command in the latest nightly? Usage is explained in the latest HelloScript.gm9 changes.

Download from here:
https://f.secretalgorithm.com/ZEpvt/godmode9-v1.6.3-15-g83c90b8a-20180418001544.zip

I don't see it in HelloScript.gm9, did you push it?

Yeah, it's not in HelloScript.gm9

It works!
To dump encTitleKeys, sdump "encTitleKeys.bin
To dump decTitleKeys, sdump "decTitleKeys.bin
To dump seeddb, sdump "seeddb.bin

Also, could there be a force overwrite flag for sdump?

Okay, could you have a look at the most recent commit and maybe try it (compile yourself or use the nightly from https://d0k3.secretalgorithm.com/

Perfect!

Alright, closing this now, assuming it solved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JoshuaDoes picture JoshuaDoes  路  4Comments

NWPlayer123 picture NWPlayer123  路  7Comments

flarn2006 picture flarn2006  路  5Comments

Jisagi picture Jisagi  路  6Comments

ghost picture ghost  路  6Comments