From bee45e61ea95f023f54983d98ab622573c799d34 Mon Sep 17 00:00:00 2001 From: Mateus Pereira Date: Tue, 19 Sep 2017 02:36:45 -0300 Subject: [PATCH] Deleted old code --- work.py | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 work.py diff --git a/work.py b/work.py deleted file mode 100644 index 2455d92..0000000 --- a/work.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -import binascii - -def main(): - textprint = '' - titleid = '' - JP = ['G','C'] - US = ['A', 'E'] - EU = ['F', 'B'] - KO = ['H'] - - with open("work.bin", "rb") as f: - f.seek(16) - - for i in range(0, 36): - text = int.from_bytes(f.read(1), 'big') - textprint = textprint + chr(text) - if i in range(7,16): - titleid = titleid + chr(text) - i = i+1 - - if titleid[3] in JP: - region = "JP" - elif titleid[3] in US: - region = "US" - elif titleid[3] in EU: - region = "EU" - elif titleid[3] in US: - region = "EU" - - print("Full Content ID: ", textprint) - print("Title ID: ", titleid) - print("Region: ", region) - - f.seek(80) - key = int.from_bytes(f.read(16), 'big') - print("License key: ", hex(key)) - - #Save key.bin - with open("key.bin", "wb") as keybin: - binstr = binascii.unhexlify((hex(key))[2:]) - keybin.write(binstr) - - #Save [contentid].txt with key - with open("{}.txt".format(textprint), 'w') as keytext: - print((hex(key))[2:].upper(), file=keytext) - -if __name__ == '__main__': - main()