forked from TheZett/Chronoswitch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated tools to encrypt EBOOT. Also fixed PSP GO bug
- Loading branch information
Showing
36 changed files
with
1,900 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
|
||
from psptool.pack import pack_btcnf | ||
from psptool.prx import encrypt | ||
|
||
parser = argparse.ArgumentParser(description="Infinity Boot Config Packer") | ||
parser.add_argument('input', type=argparse.FileType('rb'), | ||
help='The raw text file to pack') | ||
parser.add_argument('--vanity', type=str, | ||
help='Some vanity text in the executable header') | ||
parser.add_argument('output', type=str, | ||
help='The output to write the packed text') | ||
args = parser.parse_args() | ||
|
||
executable = args.input.read() | ||
executable = encrypt(pack_btcnf(executable, | ||
psptag=0x00000000), vanity=args.vanity) | ||
|
||
with open(args.output, 'wb') as f: | ||
f.write(executable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
|
||
from psptool.pack import pack_prx | ||
from psptool.prx import encrypt | ||
|
||
parser = argparse.ArgumentParser(description="Infinity Kernel Module Packer") | ||
parser.add_argument('input', type=argparse.FileType('rb'), | ||
help='The raw kernel PRX to pack') | ||
parser.add_argument('--vanity', type=str, | ||
help='Some vanity text in the executable header') | ||
parser.add_argument('output', type=str, | ||
help='The output to write the packed PRX') | ||
args = parser.parse_args() | ||
|
||
executable = args.input.read() | ||
executable = encrypt(pack_prx(executable, is_pbp=False, | ||
psptag=lambda x: 0x00000000), vanity=args.vanity) | ||
|
||
with open(args.output, 'wb') as f: | ||
f.write(executable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
|
||
from psptool.pbp import is_pbp, PBP | ||
from psptool.pack import pack_prx | ||
from psptool.prx import encrypt | ||
|
||
parser = argparse.ArgumentParser(description="Infinity Game Packer") | ||
parser.add_argument('input', type=argparse.FileType('rb'), | ||
help='The raw PBP to pack') | ||
parser.add_argument('--vanity', type=str, | ||
help='Some vanity text in the executable header') | ||
parser.add_argument('output', type=str, | ||
help='The output to write the packed PBP') | ||
args = parser.parse_args() | ||
|
||
executable = args.input.read() | ||
|
||
if not is_pbp(executable): | ||
raise ValueError("not a PBP") | ||
|
||
# Although there are several tags for MS demos, 0x0C000000 is the most | ||
# portable as it exists in every firmware | ||
pbp = PBP(executable) | ||
pbp.prx = encrypt(pack_prx(pbp.prx, is_pbp=True, | ||
psptag=lambda x: 0x0C000000), vanity=args.vanity) | ||
|
||
with open(args.output, 'wb') as f: | ||
f.write(pbp.pack()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
|
||
from psptool.pbp import is_pbp, PBP | ||
from psptool.pack import pack_prx | ||
from psptool.prx import encrypt | ||
|
||
parser = argparse.ArgumentParser(description="Infinity Updater Packer") | ||
parser.add_argument('input', type=argparse.FileType('rb'), | ||
help='The raw PBP to pack') | ||
parser.add_argument('--vanity', type=str, | ||
help='Some vanity text in the executable header') | ||
parser.add_argument('output', type=str, | ||
help='The output to write the packed PBP') | ||
args = parser.parse_args() | ||
|
||
executable = args.input.read() | ||
|
||
if not is_pbp(executable): | ||
raise ValueError("not a PBP") | ||
|
||
pbp = PBP(executable) | ||
pbp.prx = encrypt(pack_prx(pbp.prx, is_pbp=True, | ||
psptag=lambda x: 0x0B000000), vanity=args.vanity) | ||
|
||
with open(args.output, 'wb') as f: | ||
f.write(pbp.pack()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
|
||
from psptool.pack import pack_prx | ||
from psptool.prx import encrypt | ||
|
||
parser = argparse.ArgumentParser( | ||
description="Infinity User Firmware Module Packer") | ||
parser.add_argument('input', type=argparse.FileType('rb'), | ||
help='The raw user PRX to pack') | ||
parser.add_argument('--id', type=str, help='The btcnf id to set') | ||
parser.add_argument('output', type=str, | ||
help='The output to write the packed PRX') | ||
args = parser.parse_args() | ||
|
||
executable = args.input.read() | ||
executable = encrypt(pack_prx(executable, is_pbp=False, | ||
psptag=lambda x: 0x457B8AF0), id=bytes.fromhex(args.id)) | ||
|
||
with open(args.output, 'wb') as f: | ||
f.write(executable) |
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
292b8a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to exclude
__pycache__
dir from git repo.292b8a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops yeah let me remove that.