1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-20 20:37:27 +01:00

Fix #95, unexpected syntax error '[' in PHP 5.3.6-13

Fix #95
This commit is contained in:
wchen-r7 2016-04-25 19:45:06 -05:00
parent eb59b76fc6
commit 94d33b9207

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) {