All pastes #559406 Raw Edit

Someone

public php v1 · immutable
·published 2007-06-11 19:18 UTC
rendered paste body
<?phpfunction hash_part($fp,$start,$length) {	$ctx = hash_init('md5');	$remaining=$length;	$chunkSize=65536;	while ($remaining > 0) {		$read = hash_update_stream($ctx, $fp, $chunkSize);		if($read != $chunkSize) {			echo "Unexpected read value $read, when we had $remaining bytes left\n";			echo "We ".(feof($fp)?'ARE':'are NOT')." in EOF\n";		}		$remaining -= $read;		//printf("\r%04.1f%%",(1-$remaining/$length)*100);	}	//echo "\n";	return hash_final($ctx);}$fp = fopen('sl-x86-3.4.loop1-to-3.4.loop2b.xd3','rb');$hash = hash_part($fp,0,40*1024*1024);echo "$hash\n";if ($hash != "40d99ed59fba1844207283d25f833c35") {	echo "WHAT THE HELL IS GOING ON\n";}fclose($fp);?>This time I was lucky; failed on first try:>for /L %i in (1,1,10) do @php recover.php40d99ed59fba1844207283d25f833c35fb03339de843c8e421fc885e01a53ca3WHAT THE HELL IS GOING ON40d99ed59fba1844207283d25f833c3540d99ed59fba1844207283d25f833c3540d99ed59fba1844207283d25f833c3540d99ed59fba1844207283d25f833c3540d99ed59fba1844207283d25f833c3540d99ed59fba1844207283d25f833c3540d99ed59fba1844207283d25f833c3540d99ed59fba1844207283d25f833c35But no strange $read.