mirror of
https://github.com/wiiu-env/wiiuhaxx_common.git
synced 2024-12-18 12:11:50 +01:00
Remove option to set a fixed length inside the loader payload.
This commit is contained in:
parent
ca5121d198
commit
869a2de049
@ -29,7 +29,6 @@ if($filesysver == 540)$filesysver = 532;
|
||||
|
||||
require_once("wiiuhaxx_rop_sysver_$filesysver.php");
|
||||
|
||||
if(!isset($USE_FIXED_PAYLOAD_LEGNTH)) $USE_FIXED_PAYLOAD_LEGNTH = -1;
|
||||
|
||||
if(!isset($payload_size)) $payload_size = 0x20000; //Doesn't really matter if the actual payload data size in memory is smaller than this or not.
|
||||
|
||||
@ -123,7 +122,7 @@ function generate_ropchain()
|
||||
|
||||
function wiiuhaxx_generatepayload()
|
||||
{
|
||||
global $wiiuhaxxcfg_payloadfilepath, $wiiuhaxxcfg_loaderfilepath, $USE_FIXED_PAYLOAD_LEGNTH;
|
||||
global $wiiuhaxxcfg_payloadfilepath, $wiiuhaxxcfg_loaderfilepath;
|
||||
|
||||
$actual_payload = file_get_contents($wiiuhaxxcfg_payloadfilepath);
|
||||
if($actual_payload === FALSE || strlen($actual_payload) < 4)return FALSE;
|
||||
@ -131,12 +130,8 @@ function wiiuhaxx_generatepayload()
|
||||
$loader = file_get_contents($wiiuhaxxcfg_loaderfilepath);
|
||||
if($loader === FALSE || strlen($loader) < 4)return FALSE;
|
||||
|
||||
if($USE_FIXED_PAYLOAD_LEGNTH != -1){
|
||||
$len = $USE_FIXED_PAYLOAD_LEGNTH;
|
||||
}else{
|
||||
$len = strlen($actual_payload);
|
||||
}
|
||||
|
||||
$len = strlen($actual_payload);
|
||||
|
||||
while($len & 0x3)//The actual payload size must be 4-byte aligned.
|
||||
{
|
||||
$actual_payload.= pack("C*", 0x00);
|
||||
|
Loading…
Reference in New Issue
Block a user