GithubHelp home page GithubHelp logo

windsurfer1122 / psn_get_pkg_info Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 11.0 726 KB

Extract package information from header and PARAM.SFO of PS3/PSX/PSP/PSV/PSM and PS4 packages.

License: GNU General Public License v3.0

Python 94.20% Shell 5.80%

psn_get_pkg_info's People

Contributors

windsurfer1122 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

psn_get_pkg_info's Issues

About determining PSP pkg type

There are some psp pkgs that contain "EBOOT.PBP" but are labeled as PSP_DLC.
Should they be classified as PSP_GAME?

Examples:

http://ares.dl.playstation.net/cdn/JP9002/NPJG90105_00/bIjhSFSyOVcUeebAJEnUVegqAuUAOXEubDBOQNdTVDMcQNgdhMMfLKnjWJCtJPmtyIGFxMAxVhBeaTrTRAgKmSjOXGvEuyEEhpmhy.pkg
http://zeus.dl.playstation.net/cdn/JP0425/NPJH90326_00/xGSYOueBkalRHpoWPuUNTDYjYwQGDFfKqedUrriMzzxbYyGfnvjZJhjqdOUMmZMsuUkHJzwGAXUpMOteWKjRpVMHQUdJkBxLaPTDz.pkg
http://zeus.dl.playstation.net/cdn/EP0101/ULED90040_00/jNiuCNXXb2l5HBVPBf58eaSVvW7xR4KEdSvh5WKtgFof0CxJLFYujdA6RSXDAe1Us6sp0pUftBVcRBEmwlCfJ0DkcSYSyuWaCQYpQ.pkg
http://zeus.dl.playstation.net/cdn/EP4005/ULED90043_00/OUb3XTtdLRXjDahAQSU4KvxRyldR2HhGlfeD6Uql5JLi7suxXwQY1erJJLXABWnSvs8qC6bxsgfAWh7mqtwH6ksK689E1vt3wBijg.pkg
http://zeus.dl.playstation.net/cdn/EP1005/ULED90045_00/VF9d63Mc4xk6OPT29XHmTICX1YicxuAJv4JUMNbDYLbhH3E6OnTnbW0VvyA21DM7MIQrQXtUaEXXfTep3qLOXaTCaxQWrFLFHuRuP.pkg

So, the checking process is,
check pkg content type -> check PBP param.sfo category-> check if EBOOT.PBP is included...?

PS4 PKG Extract

Thanks a lot.
I am trying to create app to extract ps4 pkg files using python, could you please help for this project
Thanks & regards.

Verification of rap

Hi,

I try to verify a rap for a pkg using this command:
PSN_get_pkg_info.py --rapkey <path-to-rapfile> <path-to-pkg> -f 50 -f 0

the rap file is correctly recognized, I get the output

>>>>> EDAT RAP #1
rap["TYPE"  ]: RAP
rap["RAPKEY"]: d43acf36d6a49215b04e845b537ebc5e
rap["RIFKEY"]: 0c2f93838d117506ce5be5594e94bf11

However, concerning the verification, I get the output

RAP Key:      None

I know the rap file is valid, so what do I do wrong?

Could you maybe also elaborate what is done for the verification process?
My understanding was that you need to decrypt the eboot to test the validity and that would require the idps and act.dat info.

Edit:
I debugged the code a bit and got it working.
Change line 2517 from
and "EXT_HDR_HASH" in Results: to and "EXT_HDR_HASH" in header_fields:

not 100% sure if this fix is "correct" but seems to work fine so far

No support for Namco System 357 PKGs

Hi!

I'm not sure if support for Namco System 357 would be in this project's scope, but I'd like to bring forward this issue anyway.

I have the data for a Taiko no Tatsujin USB update dongle, which has three PKGs on it. From what I can tell, the headers on the PKGs seems to be valid and they all have the ContentID UP0001-SCEEXE000_00-FULLPACKAGE00001. Here are the full headers for one of them:

Offset(d) 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
00000000  7F 50 4B 47 00 00 00 01 00 00 00 C0 00 00 00 08  .PKG.......À....
00000016  00 00 00 C0 00 00 00 1E 00 00 00 00 03 1D C4 90  ...À..........Ä.
00000032  00 00 00 00 00 00 01 80 00 00 00 00 03 1D C2 B0  .......€......°
00000048  55 50 30 30 30 31 2D 53 43 45 45 58 45 30 30 30  UP0001-SCEEXE000
00000064  5F 30 30 2D 46 55 4C 4C 50 41 43 4B 41 47 45 30  _00-FULLPACKAGE0
00000080  30 30 30 31 00 00 00 00 00 00 00 00 00 00 00 00  0001............
00000096  9A FC C2 54 53 A5 D6 91 51 AB 04 22 30 D6 E3 4E  šüÂTS¥Ö‘Q«."0ÖãN
00000112  4A A4 E6 A1 48 00 9A 3B F0 C9 F7 0D 75 B2 EE FF  J¤æ¡H.š;ðÉ÷.u²îÿ
00000128  76 E8 DD B6 0D D7 AA 43 AA 0B B5 D9 79 E1 96 88  vèݶ.תCª.µÙyá–ˆ
00000144  BC B3 C5 C6 28 B3 2D AD 2C 32 9E 52 3C 96 DB F2  ¼³ÅÆ(³-.,2žR<–Ûò
00000160  99 95 95 6A 88 E5 29 B7 70 01 66 AE DF 09 89 BE  ™••jˆå)·p.f®ß.‰¾
00000176  F8 74 0D BA 03 FF 12 7D 50 42 28 10 9E 8E C6 61  øt.º.ÿ.}PB(.žŽÆa

When opening the PKG with PSN_get_pkg_info, the following happens:

# >>>>>>>>>> PKG Source: C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Unaligned encrypted offset 0xed0d9d023a95c702-0x2=0xed0d9d023a95c700(+0x180) for #0 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x95d691a035f5269e-0xe=0x95d691a035f52690(+0x180) for #1 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xacb4a33f8cdafe42-0x2=0xacb4a33f8cdafe40(+0x180) for #2 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xc5395ae828411ba1-0x1=0xc5395ae828411ba0(+0x180) for #3 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x6623beec4e47b95d-0xd=0x6623beec4e47b950(+0x180) for #4 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xb26e05bccbc0084b-0xb=0xb26e05bccbc00840(+0x180) for #5 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xfed03a7c96792125-0x5=0xfed03a7c96792120(+0x180) for #6 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xb8f47dc957b24ed-0xd=0xb8f47dc957b24e0(+0x180) for #7 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x396babe8fdb6b505-0x5=0x396babe8fdb6b500(+0x180) for #8 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xab39785eebd332fd-0xd=0xab39785eebd332f0(+0x180) for #9 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xad3b74caf91cf406-0x6=0xad3b74caf91cf400(+0x180) for #10 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x98a2f9f5060e4a9e-0xe=0x98a2f9f5060e4a90(+0x180) for #11 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x6043cdee934f9e27-0x7=0x6043cdee934f9e20(+0x180) for #12 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x38b8bd9bbfd5774b-0xb=0x38b8bd9bbfd57740(+0x180) for #13 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xe06d94d467e24182-0x2=0xe06d94d467e24180(+0x180) for #14 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xe1a709a90c65c0fa-0xa=0xe1a709a90c65c0f0(+0x180) for #15 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xa0216b52d5358322-0x2=0xa0216b52d5358320(+0x180) for #16 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x5f61a6fa869529e3-0x3=0x5f61a6fa869529e0(+0x180) for #17 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x7ba681dd9bd2935e-0xe=0x7ba681dd9bd29350(+0x180) for #19 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xc24d00026a528d6b-0xb=0xc24d00026a528d60(+0x180) for #20 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x2eb8416f1dbe08f-0xf=0x2eb8416f1dbe080(+0x180) for #21 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x1184b1666da1b7ed-0xd=0x1184b1666da1b7e0(+0x180) for #23 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xdb427537e80a8355-0x5=0xdb427537e80a8350(+0x180) for #24 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x8e5510fa46c84fab-0xb=0x8e5510fa46c84fa0(+0x180) for #25 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xc6d1d43ebcd0eecb-0xb=0xc6d1d43ebcd0eec0(+0x180) for #26 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xf523c9e9c7e814b4-0x4=0xf523c9e9c7e814b0(+0x180) for #27 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0x15b1239468da7a54-0x4=0x15b1239468da7a50(+0x180) for #28 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ALIGN] Unaligned encrypted offset 0xcb60494ebcd3b018-0x8=0xcb60494ebcd3b010(+0x180) for #29 item data. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[ALIGN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[UNKNOWN] Item Names with offset 0x13715896 are not directly following the Item Entries with size 0x3c0. C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN
[UNKNOWN] Please report this issue at https://github.com/windsurfer1122/PSN_get_pkg_info
[ERROR] Could not get PKG3 encrypted data at offset 0x540 with size 8265223184 from C:\Users\Kemo\Downloads\TNT_RED_ASIA_UPD_NEWPCBONLY\VERSIONUP\DATA00012.BIN

I've uploaded DATA00012.BIN here: https://anonfile.com/Q16cQeveb8/DATA00012_BIN (please feel free to edit out the link after you've downloaded it)

Could you possibly look into this and see if support can be added for these PKGs?

Support for livearea update pkg

This relates to the pkgs that update the livearea itself as opposed to title update from the livarea.

For example:

http://livearea.np.dl.playstation.net/livearea/e/info/np/PCSC00001/ff6e27b59c527e6d133e8548783f4431c3a35c892d6aa620c1d9a4444b8b134c/PCSC00001-0.pkg

It works but shows a couple lines of unknowns before outputting the analysis

[UNKNOWN] PKG3 Key Index 3
[UNKNOWN] PKG content type 23/0x17. http://livearea.np.dl.playstation.net/livearea/e/info/np/PCSC00001/ff6e27b59c527e6d133e8548783f4431c3a35c892d6aa620c1d9a4444b8b134c/PCSC00001-0.pkg

Script for computing the URL is found here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.