Replies: 9 comments
-
hi @bzier, nice work on getting to the bottom of this! 😇 the key is the decimal representation of the PCSaveKey. Since you are using PS3, it is likely the SaveKey is different (psarc's are also encrypted with a different key on PS3). wrt the profile structure, i think it looks like
definitely take a look at rscustom project, they did the initial research on PS3 Rocksmith PSARC files (not sure about PRFLDB), but the code should still be useful. since you are experimenting with PRFLDB, i would also suggest rsrtools python library. The library allows you to load and save prfldb with ease and is really well documented. This project is using the PCSaveKey as well, so you will have to find the PS3SaveKey from somewhere. Good luck and let me know how your search goes! |
Beta Was this translation helpful? Give feedback.
-
Hi @bzier, rsrtools is also pretty heavily linked to a steam file layout. If you have python installed, I can put together a snippet that can be run on a prfldb file in any location. You may also have luck with the tools I drew on heavily while assembling rsrtools: rs-utils and rocksmith. As an aside, I can't remember seeing any by platform keys for the prfldb files (they do vary by platform for the PSARC files). |
Beta Was this translation helpful? Give feedback.
-
Thank you both so much for your responses. All of those links/resources are extremely helpful. I have been spending quite a bit of time the last two days digging into tools for dealing with PS3 game saves (mostly "Bruteforce Save Data", but just found a couple others as well that I'm exploring). I found a tool intended for "Demon's Souls" saves here, which also has some great documentation about the PS3 file protection mechanisms here. I think I may have been able to decrypt the file using the tool (after changing the I'm wondering if either/both of you could share an example PRFLDB file from the PC (I don't have the PC version), just so I can see an example of what I'm looking for. It is a bit hard to tell if there are multiple layers of encryption, or if the file layout / headers may just be different, etc. I'm happy to share mine as well if anyone wants to take a look at it. Thanks again for the help & info provided already. I appreciate it. |
Beta Was this translation helpful? Give feedback.
-
here you go, two different profiles: prfldb.zip
i have the same hunch, it's likely encrypted one more time PS3Decrypt -> RSDecrypt -> Unzip -> JSON |
Beta Was this translation helpful? Give feedback.
-
@bzier I'm happy to take a look at one of your PS3 prfldb files to see if I can spot anything obvious. Right at the moment, I have more time than usual on my hands ... (and I'm plain curious). |
Beta Was this translation helpful? Give feedback.
-
Awesome, got it 👍 The first 4 bytes appear to be some data length, but not sure exactly of what. In my case, the first 4 bytes are Regardless, the next 4 bytes were: As I have time over the next few days, I'll try to clean up everything I've been hacking with over the last couple days, and make it available. Still want to actually wire this into the rs-manager to take a look at my stats, now that I've got them ;) Thanks again to both of you for the help. |
Beta Was this translation helpful? Give feedback.
-
Just to document my steps here, for myself as much as for anyone else:
Note that, as none of the songs are on my computer, I'm bypassing importing the psarcs, so I'm still having issues fully utilizing rs-manager. However, I was at least able to get it to read/populate the "General" stats & one of the "Songs" stats (playthroughs). Files:
|
Beta Was this translation helpful? Give feedback.
-
@bzier Nice work! I think @JustinAiken may have put together a list correlating song ids and song data for ODLC, and there may well be something similar on customsforge. This may be helpful for populating your song data? |
Beta Was this translation helpful? Give feedback.
-
Perhaps. I honestly haven't gotten that far yet in looking into what may be next for the song data. Since I skipped all the steam stuff, the DLC directory was undefined, and I bumped into failures when it attempted to scan for the psarcs. So I simply bypassed that chunk of code for the import. Was able to get it to load the main screen, but only with the data populated in the screenshot I shared. That was enough to call it a night :) Depending on how busy I am this week, I may start looking at the next steps as well, so any additional info is certainly welcome. |
Beta Was this translation helpful? Give feedback.
-
Hi @sandiz,
I am attempting to use this project with a profile database which I backed up from my PS3. Currently this project is fairly tightly coupled to Steam & the PC version of Rocksmith. I'm not too worried about working through those aspects yet.
For now, I'm simply trying to call the
readProfile
function, passing the path to my PRFLDB file. I uncommented the line to dump the profile data to a JSON file, just to see if I could read the file. However, I'm currently failing earlier in the process. Either there is a problem decrypting the DB, or the file may be in a different format, which is unreadable by Zlib.Main question:
I am wondering what you can tell me about some magic values...
The decryption key here:
And skipping 20 bytes here:
The details:
Initially, calling the
readProfile
method as-is, I hit this exception:Digging into that a bit, I found that I may need to pad the data (according to this SO answer). I did that with another example I found, like this:
While that allowed it to decrypt 'successfully', it then fails on unzipping with the following:
Dumping the data to a file and examining it, it truly does not appear to be any kind of zip file (zip, tar, 7z, etc). I also tried not slicing off the first 20 bytes, which did allow it to decrypt without the need for padding. However, it fails in the same way when trying to unzip.
I looked back at the history of the
steamprofileService.js
file to see if I could glean anything from the history, but the key & decryption code was there from the beginning. Any tips/advice you can provide would be helpful, either to understand how/where you got the decryption method, or how I should move forward.Thanks, and sorry for the looong post.
-Brian
Beta Was this translation helpful? Give feedback.
All reactions