1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-12-15 02:35:54 +01:00

Land #96, syntax errors in PHP versions < 5.4

This commit is contained in:
James Lee 2016-04-26 14:53:47 -05:00
commit 328bd0a93d
No known key found for this signature in database
GPG Key ID: 2D6094C7CEA0A321

View File

@ -1263,7 +1263,8 @@ while (false !== ($cnt = select($r, $w, $e, $t))) {
}
$xor = strrev(substr($header, 0, 4));
$request = substr($header, 4);
$len = unpack("Nlen", xor_bytes($xor, substr($request, 0, 4)))['len'];
$len_array = unpack("Nlen", xor_bytes($xor, substr($request, 0, 4)));
$len = $len_array['len'];
# length of the whole packet, including header
# packet type should always be 0, i.e. PACKET_TYPE_REQUEST
while (strlen($request) < $len) {