PS3 pkg_custom 1.4

I don't think it's encrypted properly.
In pkg.py line 532 it reads 1MB:
piece = fo.read(0x100000) <--- that is 0x10 * 0x10000
Then in line 538 it calls: context = pkgcrypt.keycrypt(context)

In crypt.c line 75 the loop is processed until manipulation_count = 10000 <== should be 0x10000

If the pkg is larger than 156KB (0x10 * 10000), it probably is not encrypted correctly. You should check the MD5 of the extracted files to confirm that it's broken ;)

Yes i think there is error an error i test the program three time but give me same error but the screen shot too bad sorry i will shot it again when i back to home
ba9d830e08adb34d54779682054a7340.jpg



Sent from my iPhone using Tapatalk
 
I don't think it's encrypted properly.
In pkg.py line 532 it reads 1MB:
piece = fo.read(0x100000) <--- that is 0x10 * 0x10000
Then in line 538 it calls: context = pkgcrypt.keycrypt(context)

In crypt.c line 75 the loop is processed until manipulation_count = 10000 <== should be 0x10000

If the pkg is larger than 156KB (0x10 * 10000), it probably is not encrypted correctly. You should check the MD5 of the extracted files to confirm that it's broken ;)
It is wrong but it works anyway. If you change manipulation_count to 5 it still works, I verified the files in the pkg. So I'm not entirely sure what's happening there, but if it isn't broke, don't fix it :)
 
AWESOME!! Could we have the new source code for anyone that want to check your changes and help fix issues (if any is found)?

BTW I created a simple script to help to convert HTML to offline javascript links using your method.

Just put any html (or html + ps3xploit_v301.js) in the same folder of the vbs and it will create various txt and a index_test.html when the vbs is executed.

Could you verify it?

hello excuse me I'm a novice in this is about the devil303 plugin I try to place it in the custom pkg with the path of its folders that is dev_flash / vhs / xxxx / xxxx but at the time of installation it tells me that it is impossible to access the usb ... the plugin to handle xbox and ps4 commands can be entered and the installation worked and many more things are tests in HFW with HEN ... by the way devil303 your download plugin works perfectly in HFW HEN
 
Updated to 1.2, fixed issue mentioned by @ayassinsayed (thanks), also removed usage of the temporary "fileData.dat" file. I am keeping the original tool in the OP as a reference.
hello excuse me I'm a novice in this is about the devil303 plugin I try to place it in the custom pkg with the path of its folders that is dev_flash / vhs / xxxx / xxxx but at the time of installation it tells me that it is impossible to access the usb ... the plugin to handle xbox and ps4 commands can be entered and the installation worked and many more things are tests in HFW with HEN ... by the way devil303 your download plugin works perfectly in HFW HEN
The folder needs to be named dev_blind, not dev_flash. Flash also needs to be mounted to that path before installing.
 
It is wrong but it works anyway. If you change manipulation_count to 5 it still works, I verified the files in the pkg. So I'm not entirely sure what's happening there, but if it isn't broke, don't fix it :)

FYI if you comment the line: #context = pkgcrypt.keycrypt(context) it still works :)
So apparently there is no need for a loop of 10000 or 0x10000 or 5
.
 
FYI if you comment the line: #context = pkgcrypt.keycrypt(context) it still works :)
So apparently there is no need for a loop of 10000 or 0x10000 or 5
.
Hmm that's odd. Before I added that line, files added to the pkg were corrupted. I guess something else I changed fixed it. Thanks for telling me.

BTW I was wondering, did you use IDA to fix the directory depth issue with psn_package_npdrm.exe? I am trying to find a way to change the ContentType header value to "theme" (0x09) while having it scan files as if it were a gamedata pkg, I've had no such luck with this. The reason why I want to use psn_package_npdrm.exe is because it's a lot faster than this Python script.
 
Hmm that's odd. Before I added that line, files added to the pkg were corrupted. I guess something else I changed fixed it. Thanks for telling me.

BTW I was wondering, did you use IDA to fix the directory depth issue with psn_package_npdrm.exe? I am trying to find a way to change the ContentType header value to "theme" (0x09) while having it scan files as if it were a gamedata pkg, I've had no such luck with this. The reason why I want to use psn_package_npdrm.exe is because it's a lot faster than this Python script.

No, I only used HxD and trial/error ;) I found the correct offset in the first try :-p
 
Hmm that's odd. Before I added that line, files added to the pkg were corrupted. I guess something else I changed fixed it. Thanks for telling me.

BTW I was wondering, did you use IDA to fix the directory depth issue with psn_package_npdrm.exe? I am trying to find a way to change the ContentType header value to "theme" (0x09) while having it scan files as if it were a gamedata pkg, I've had no such luck with this. The reason why I want to use psn_package_npdrm.exe is because it's a lot faster than this Python script.

The offset in psn_package_npdrm.exe for content type is 0x1D271
However if you change it from 04 to 09 the pkg don't scan the subfolders
 
The offset in psn_package_npdrm.exe for content type is 0x1D271
However if you change it from 04 to 09 the pkg don't scan the subfolders
Wow, thanks a lot! It doesn't seem to have any effect though, I changed it to 09 and the output pkg is exactly the same, with sub-directories still being scanned too. Can you share the package.conf you were using?
 
Wow, thanks a lot! It doesn't seem to have any effect though, I changed it to 09 and the output pkg is exactly the same, with sub-directories still being scanned too. Can you share the package.conf you were using?

For me it changed the content type to theme (0x09), game exec (0x05), game data (0x04).
The content type in the package.conf that I was using was GD. It probably didn't have effect if you used a different content type.

When I used 0x09 it didn't scan the subfolders. BTW I use the parameter -n to ignore the pkg validations:

psn_package_npdrm.exe -n package.conf CUSTOM

I also tried changing the subfolder HTMLDIR to /./. (it lets to scan alls the sub-folders in CUSTOM folder) and combined it with ForcedInstallTo=../../../ the package seems to be built properly, but the package fails during the installation on the PS3.
I think it could have failed because I also changed PS3LOGO.DAT to (null)S3LOGO.DAT in the exe to avoid the creation of that file.

This is the package.conf that I used:
ContentID = CUSTOM-INSTALLER_00-0000000000000000
klicensee = 0x00000000000000000000000000000000
DRMType = Free
ContentType = GD
PackageVersion = 01.00
ForcedInstallTo=../../../

I didn't continue with the tests due I was working in MAMBA 8.2 and PS3HEN 2.0.1 beta 2 :-p
 
Last edited:
For me it changed the content type to theme (0x09), game exec (0x05), game data (0x04).
The content type in the package.conf that I was using was GD. It probably didn't have effect if you used a different content type.

When I used 0x09 it didn't scan the subfolders. BTW I use the parameter -n to ignore the pkg validations:

psn_package_npdrm.exe -n package.conf CUSTOM

I also tried changing the subfolder HTMLDIR to /./. (it lets to scan alls the sub-folders in CUSTOM folder) and combined it with ForcedInstallTo=../../../ the package seems to be built properly, but the package fails during the installation on the PS3.
I think it could have failed because I also changed PS3LOGO.DAT to (null)S3LOGO.DAT in the exe to avoid the creation of that file.

This is the package.conf that I used:
ContentID = CUSTOM-INSTALLER_00-0000000000000000
klicensee = 0x00000000000000000000000000000000
DRMType = Free
ContentType = GD
PackageVersion = 01.00
ForcedInstallTo=../../../

I didn't continue with the tests due I was working in MAMBA 8.2 and PS3HEN 2.0.1 beta 2 :-p
I believe the offset you found is the default fallback content type value, used when the content type in the package.conf isn't valid (GD). GameData would be the correct content type in this case. So this is basically the same as setting the content type to "Theme".

My intention was to trick the tool into creating a Theme pkg while scanning content as if it were a GameData pkg, I don't know if it can be done easily.

FYI ForcedInstallTo/InstallDirectory is ignored in theme packages. I have another method to create custom theme pkgs with psn_package_npdrm.exe but changing the header manually forces you to resign the pkg to fix the hashes, I'd rather find another way to do this.

I can already create custom GameData packages with one minor issue, a corrupted data icon appears after installation however you can delete it and AFAIK it doesn't cause any data loss. It's not a big problem to me personally, but I'd still like to fix it if possible.

I appreciate your help :)
 
im create package whit estructure and not works

im activate han_flashmount and not install the pkg

View attachment 17798
You probably did not resign the pkg for HAN.
Ask me, creating a PKG installed to dev_hdd0/exdata/should have any settings
No, just create it like normal. Don't forget to sign it for HAN.


THe signing for HAN step is only required due to the fact that the flash mounters do not allow debug pkgs to install for some reason.
 
You probably did not resign the pkg for HAN.

No, just create it like normal. Don't forget to sign it for HAN.


THe signing for HAN step is only required due to the fact that the flash mounters do not allow debug pkgs to install for some reason.
Thank you
 
Back
Top