silicontrip / SkyReader

A Skylander portal reader/editor/writer for OSX.
87 stars 55 forks source link

no need to fill blocks with zeros #15

Open capull0 opened 7 years ago

capull0 commented 7 years ago

Hi,

not all blocks after 0x08 are encrypted. here the diff:

diff --git a/crypt.cpp b/crypt.cpp
index dad77f3..ec39e06 100644
--- a/crypt.cpp
+++ b/crypt.cpp
@@ -19,7 +19,8 @@ int Crypt::IsAccessControlBlock(unsigned int blockIndex) {
 }

 int Crypt::ShouldEncryptBlock(unsigned int blockIndex) {
-    if ((blockIndex >= 8) && (IsAccessControlBlock(blockIndex) == 0)) {
+    //if ((blockIndex >= 8) && (IsAccessControlBlock(blockIndex) == 0)) {
+    if ((blockIndex >= 0x08 && blockIndex <= 0x15 && IsAccessControlBlock(blockIndex) == 0) || (blockIndex >= 0x24 && blockIndex <= 0x31 && IsAccessControlBlock(blockIndex) == 0)) {
         return 1;
     }
     return 0;
mikecthulhu commented 7 years ago

Hi @capull0 , I downloaded this branch (silicontrip) and yours, I am able to compile and run this one, but even when I run the editor with sudo under Ubuntu 14.04 it says "Unable to write to Portal." so what I did was download your fork and try to compile it to see if I can get pass that error code but whenever I run make, it does not compile and it says: "/usr/bin/ld: cannot find -lusb-1.0 collect2: error: ld returned 1 exit status make: *** [editor] Error 1"

I'm not interested in reading/writing figures (I don't even have the game or a figure), what I'm interested in is to control the LEDs in the portal (bought one in gamestop for 2 bucks) in order to use it as a night lamp for my little girl (controlled maybe by a raspberry pi in the future).

Sorry for posting here but I wasn't able to post under your fork.

PS: I already did a 'sudo apt-get install libusb-1.0-0-dev libc6-dev-i386 gcc-multilib g++-multilib' and still cant compile your fork, any help would be greatly appreciated.