Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no need to fill blocks with zeros #15

Open
capull0 opened this issue Dec 11, 2016 · 1 comment
Open

no need to fill blocks with zeros #15

capull0 opened this issue Dec 11, 2016 · 1 comment

Comments

@capull0
Copy link

capull0 commented Dec 11, 2016

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants