-
Notifications
You must be signed in to change notification settings - Fork 378
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
Use the PPPoE password to determine the system version #56
base: master
Are you sure you want to change the base?
Conversation
pppwn.py
Outdated
if pkt[PPP_PAP_Request].passwd_len != 0: | ||
pwd = pkt[PPP_PAP_Request].password.decode("ascii") | ||
print("PAP password:", pwd) | ||
if pwd in ('750', '751', '755')\ |
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.
Rewrite to not repeat the same list of fws
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.
I don't think we really need to know from where the firmware was selected, so I removed the check altogether. I can rewrite the other way if you prefer it.
In case offsets differ from retail/devkit, for example.
- < 5.50 needs less patching for copyin/copyout/copyinstr - < 6.50 did not need veri patches - < 6.50 does not require changes for ud2 instruction
Opened a PR with checks for multi FW stuff for lower FWs on this branch. |
Add more stuff for multi FW support
Merged, thank you! |
def getOffsets(sys_ver): | ||
if sys_ver in ('750', '751', '755'): | ||
return OffsetsFirmware_750_755() | ||
elif sys_ver in ('800', '801', '803'): | ||
return OffsetsFirmware_800_803() | ||
elif sys_ver in ('850', '852'): | ||
return OffsetsFirmware_850_852() | ||
elif sys_ver == '900': | ||
return OffsetsFirmware_900() | ||
elif sys_ver in ('903', '904'): | ||
return OffsetsFirmware_903_904() | ||
elif sys_ver in ('950', '951', '960'): | ||
return OffsetsFirmware_950_960() | ||
elif sys_ver in ('1000', '1001'): | ||
return OffsetsFirmware_1000_1001() | ||
elif sys_ver in ('1050', '1070', '1071'): | ||
return OffsetsFirmware_1050_1071() | ||
elif sys_ver == '1100': | ||
return OffsetsFirmware_1100() | ||
return None |
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.
def getOffsets(sys_ver): | |
if sys_ver in ('750', '751', '755'): | |
return OffsetsFirmware_750_755() | |
elif sys_ver in ('800', '801', '803'): | |
return OffsetsFirmware_800_803() | |
elif sys_ver in ('850', '852'): | |
return OffsetsFirmware_850_852() | |
elif sys_ver == '900': | |
return OffsetsFirmware_900() | |
elif sys_ver in ('903', '904'): | |
return OffsetsFirmware_903_904() | |
elif sys_ver in ('950', '951', '960'): | |
return OffsetsFirmware_950_960() | |
elif sys_ver in ('1000', '1001'): | |
return OffsetsFirmware_1000_1001() | |
elif sys_ver in ('1050', '1070', '1071'): | |
return OffsetsFirmware_1050_1071() | |
elif sys_ver == '1100': | |
return OffsetsFirmware_1100() | |
return None | |
def getOffsets(sys_ver): | |
match sys_ver: | |
case '750' | '751' | '755': | |
return OffsetsFirmware_750_755() | |
case '800' | '801' | '803': | |
return OffsetsFirmware_800_803() | |
case '850' | '852': | |
return OffsetsFirmware_850_852() | |
case '900': | |
return OffsetsFirmware_900() | |
case '903' | '904': | |
return OffsetsFirmware_903_904() | |
case '950' | '951' | '960': | |
return OffsetsFirmware_950_960() | |
case '1000' | '1001': | |
return OffsetsFirmware_1000_1001() | |
case '1050' | '1070' | '1071': | |
return OffsetsFirmware_1050_1071() | |
case '1100': | |
return OffsetsFirmware_1100() | |
case _: | |
return None |
Perhaps use a switch statement instead. Improves readability and also gives a slight perf improvement.
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.
Maybe use a map string -> function pointer
@@ -205,6 +215,11 @@ class OffsetsFirmware_850_852: | |||
|
|||
MEMCPY = 0xffffffff825a40f0 | |||
|
|||
# Not available on FW >= 6.50 |
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.
Why do you have these comments
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.
Pre 6.50 you don't have the ud2 in that gadget, we can actually remove the MOV_CR0_RSI_MOV_EAX_1_RET
gadget from FW >=6.50 and the MOV_CR0_RSI_UD2_MOV_EAX_1_RET
from FW < 6.50. I just had them there when I was working on stuff so I could keep stuff straight, they're just the base @ ffffffff82200000 as a placeholder.
Or we can remove the conditional when the gadget is used and just use one of them for both (variable name won't match contents).
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.
Well please remove them
@@ -65,18 +65,20 @@ On your PS4: | |||
- Go to `Settings` and then `Network` | |||
- Select `Set Up Internet connection` and choose `Use a LAN Cable` | |||
- Choose `Custom` setup and choose `PPPoE` for `IP Address Settings` | |||
- Enter anything for `PPPoE User ID` and `PPPoE Password` | |||
- Enter anything for `PPPoE User ID` | |||
- Enter PS4/PS5 System Software version (e.g 900 for 9.00) for `PPPoE Password` |
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.
Why PS5??
if key == "sys_ver": | ||
return pwd | ||
|
||
def getOffsets(sys_ver): |
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.
get_offsets
Will that fallback if I'll continue to use |
All these changes were made by CelesteBlue, I'm just doing the PR since Celeste doesn't have a GitHub account anymore.