mirror of
https://github.com/wiiu-env/wiiuhaxx_common.git
synced 2024-12-18 12:11:50 +01:00
Do the payload padding automatically instead of requiring the payload to be already aligned.
This commit is contained in:
parent
4a4c13af09
commit
f4f5cd63dc
@ -107,7 +107,11 @@ function wiiuhaxx_generatepayload()
|
|||||||
if($loader === FALSE || strlen($loader) < 4)return FALSE;
|
if($loader === FALSE || strlen($loader) < 4)return FALSE;
|
||||||
$len = strlen($actual_payload);
|
$len = strlen($actual_payload);
|
||||||
|
|
||||||
if($len & 0x3)return FALSE;//The actual payload size must be 4-byte aligned.
|
while($len & 0x3)//The actual payload size must be 4-byte aligned.
|
||||||
|
{
|
||||||
|
$actual_payload.= pack("C*", 0x00);
|
||||||
|
$len = strlen($actual_payload);
|
||||||
|
}
|
||||||
|
|
||||||
$loader .= pack("N*", $len);
|
$loader .= pack("N*", $len);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user