Port title database and cdecrypt to Go (#87)

* Experimental removal of cdecrypt

* Pushing before cdecrypt port

* Some progress...

* Replace title database with native Go

* Update title db url

* Almost working decryption and extraction

* Almost there

* Remove unnecessary type conversion

* Fix directory structure creation

* Finally fix decryption

* Cleanup print statements

* Do not write FST to file

* Add progress

* Add encrypted contents decryption
This commit is contained in:
Xpl0itU 2024-03-31 19:38:13 +02:00 committed by GitHub
parent b031be4ecd
commit e40d499b72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 589 additions and 2897 deletions

View file

@ -20,15 +20,5 @@ opener = urllib.request.build_opener(urllib.request.HTTPSHandler(context=ssl_con
opener.addheaders = [("User-agent", "NUSspliBuilder/2.1")]
urllib.request.install_opener(opener)
checkAndDeleteFile("gtitles/gtitles.c")
urllib.request.urlretrieve("https://napi.v10lator.de/db", "gtitles/gtitles.c")
os.system("gcc -c -Wall -fpic -Ofast -pipe -Igtitles -o gtitles/gtitles.o gtitles/gtitles.c")
os.system("ar rcs libgtitles.a gtitles/gtitles.o")
os.system("gcc -shared -o gtitles/libgtitles.so gtitles/gtitles.o")
os.system("gcc -c -Wall -fpic -Ofast -pipe -UNDEBUG -DAES_ROM_TABLES -D_GNU_SOURCE -Icdecrypt -o cdecrypt/aes.o cdecrypt/aes.c")
os.system("gcc -c -Wall -fpic -Ofast -pipe -UNDEBUG -DAES_ROM_TABLES -D_GNU_SOURCE -Icdecrypt -o cdecrypt/cdecrypt.o cdecrypt/cdecrypt.c")
os.system("gcc -c -Wall -fpic -Ofast -pipe -UNDEBUG -DAES_ROM_TABLES -D_GNU_SOURCE -Icdecrypt -o cdecrypt/sha1.o cdecrypt/sha1.c")
os.system("gcc -c -Wall -fpic -Ofast -pipe -UNDEBUG -DAES_ROM_TABLES -D_GNU_SOURCE -Icdecrypt -o cdecrypt/util.o cdecrypt/util.c")
os.system("ar rcs libcdecrypt.a cdecrypt/*.o")
os.system("gcc -shared -o cdecrypt/libcdecrypt.so cdecrypt/*.o")
checkAndDeleteFile("db.go")
urllib.request.urlretrieve("https://napi.v10lator.de/db?t=go", "db.go")