Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #3DS CTR Decryptor helper script by xerpi
- import sys
- import glob
- import os
- import subprocess
- from subprocess import check_output
- print "3DS CTR Decryptor helper script by xerpi"
- print "Enter the file you want to decrypt:"
- filename = raw_input();
- print "\nCreating ncchinfo.bin..."
- try:
- check_output([glob.glob("./ctrKeyGen*")[0], filename])
- except Exception:
- print "Failed to open ctrKeyGen, is it here?"
- sys.exit()
- print "Done! Now copy the ncchinfo.bin to the root of your SD"
- print "And run the Launcher.dat\n"
- raw_input("Press Enter to continue...")
- print "Extracting .3ds FS... (may take a while)"
- try:
- check_output([glob.glob("./ctrtool*")[0], "-p", "--exefs=exefs.encrypted.bin", "--exheader=exheader.encrypted.bin", "--romfs=romfs.encrypted.bin", "%s"%filename])
- except Exception:
- print "Failed to open ctrtool, is it here?"
- sys.exit()
- print "(ignore the error above) Done!"
- print "Once the Launcher.dat has finished, copy all the xorpads here"
- raw_input("Press Enter to continue...")
- print "XORing exefs..."
- try:
- subprocess.call([glob.glob("./padxorer*")[0], "./exefs.encrypted.bin", glob.glob("./*.exefs.xorpad")[0]])
- except Exception:
- print "Failed"
- pass
- else:
- os.rename("./exefs.encrypted.bin.out", "./exefs.decrypted.bin")
- print "XORing exheader..."
- try:
- subprocess.call([glob.glob("./padxorer*")[0], "./exheader.encrypted.bin", glob.glob("./*.exheader.xorpad")[0]])
- except Exception:
- print "Failed"
- pass
- else:
- os.rename("./exheader.encrypted.bin.out", "./exheader.decrypted.bin")
- print "XORing romfs..."
- try:
- subprocess.call([glob.glob("./padxorer*")[0], "./romfs.encrypted.bin", glob.glob("./*.romfs.xorpad")[0]])
- except Exception:
- print "Failed"
- pass
- else:
- os.rename("./romfs.encrypted.bin.out", "./romfs.decrypted.bin")
- print "Everything finished :D"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement