Do the payload padding automatically instead of requiring the payload to be already aligned.

This commit is contained in:
yellows8 2015-12-05 00:52:03 -05:00
parent 4a4c13af09
commit f4f5cd63dc
1 changed files with 5 additions and 1 deletions

View File

@ -107,7 +107,11 @@ function wiiuhaxx_generatepayload()
if($loader === FALSE || strlen($loader) < 4)return FALSE;
$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);