From 002c2a6fb14e9be2c1cc1c015103cd79fecfd404 Mon Sep 17 00:00:00 2001 From: megazig Date: Sat, 24 Oct 2009 09:16:50 -0500 Subject: [PATCH] createNAND.py update --- tests/createNAND.py | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/tests/createNAND.py b/tests/createNAND.py index 28efe06..ef0013b 100644 --- a/tests/createNAND.py +++ b/tests/createNAND.py @@ -3,19 +3,12 @@ import os, sys, Wii def lolcrypt( string ): - key = 0x73b5dbfa - out = "" - #while(*string) + key = 0x73B5DBFA + out = '' for x in xrange(len(string)): - if ord(string[x]) == '\0': - continue - #*string ^= (key & 0xff) - out = out + chr( ord(string[x]) ^ (key & 0xff) ) - #string += 1 - #key = ((key<<1) | (key>>31)) - key = ((key & 0x8fffffff) << 1) | ((key & 0xfffffffe) >> 1) - for x in xrange( 0x100 - len(out) ): - out = out + '\0' + out += chr( ord(string[x]) ^ (key & 0xff) ) + key = ((key << 1) & 0xffffffff) | ((key >> 31) & 0xffffffff) + out += ( '\x00' * ( 0x100 - len(out) ) ) return out def main(): @@ -29,17 +22,20 @@ def main(): sysV = 417 iosV = 6174 - nand.importTitle(Wii.NUS.download(0x0000000100000002, sysV), False) - nand.importTitle(Wii.NUS.download(0x000000010000003C, iosV), False) - #nand.importTitle(Wii.NUS.download(0x0001000848414C45), False) - #nand.importTitle(Wii.NUS.download(0x0001000848414B45), False) - settings = "AREA=USA\r\nMODEL=RVL-001(USA)\r\nDVD=0\r\nMPCH=0x7FFE\r\nCODE=LU\r\nSERNO=56866191\r\nVIDEO=NTSC\r\nGAME=US\r\n" + nand.importTitle(Wii.NUS.download(0x0000000100000002, sysV), False, True, False) + nand.importTitle(Wii.NUS.download(0x000000010000003C, iosV), False, True, False) + #nand.importTitle(Wii.NUS.download(0x0001000848414C45), False, False, True, False) + #nand.importTitle(Wii.NUS.download(0x0001000848414B45), False, False, True, False) + settings = "AREA=USA\r\nMODEL=RVL-001(USA)\r\nDVD=0\r\nMPCH=0x7FFE\r\nCODE=LU\r\n\nSERNO=568661910\r\nVIDEO=NTSC\r\nGAME=US\r\n" + #settings = "CODE=LU\r\nAREA=EUR\r\nDVD=0\r\nGAME=EU\r\nVIDEO=PAL\r\nMPCH=0x7FFE\r\nMODEL=RVL-001(EUR)\r\nSERNO=-559038737\r\n" file = open(sys.argv[1] + '/title/00000001/00000002/data/setting.txt', 'wb') file.write(lolcrypt(settings)) file.close() - print lolcrypt(lolcrypt(settings)) + #print lolcrypt(lolcrypt(settings)) settings_txt = Wii.CONF(sys.argv[1] + '/title/00000001/00000002/data/setting.txt') - print settings_txt.getKeysName() + #print settings_txt.getKeysName() + #for x in settings_txt.getKeysName(): + # print settings_txt.getKeyValue(x) #nand.add('setting.txt') sys.exit(0)