I'm new to PHP and wanted help to improve this code which incidentally is not mine.
it does not decode using METHOD POSTas above.
more if I do it yes, it works
can anyone help me?
PHP Code:
<?php
echo "<h2>Decode Eval</h2>";
echo "<form action='' method='post'>";
echo "<b>Código</b>: <p><textarea name=cod cols=100 rows=20></textarea></p>";
echo "<input type='submit' value=' Decode '>";
echo "<hr><br />";
//Kodlama By s4l1h
if($_POST['cod']){
$ac=$_POST['cod'];
$ac=preg_replace("/<\?php|\?>/", "", $ac);
$ac=preg_replace("/<\?|\?>/", "", $ac);
$desen="|eval\((.*)\((.*)\(\'(.*)\'\)\)\)\;|siU"; // eval(gzinflate(base64_decode('FZ3HjuvQlUV...')));
$desen2="|eval\((.*)\((.*)\((.*)\(\'(.*)\'\)\)\)\)\;|siU"; //eval(gzinflate(str_rot13(base64_decode('FZ3HjuvQlUV...'))));
$desen3="|eval\((.*)\(\'(.*)\'\)\)\;|siU"; // eval(base64_decode('aWYoJGF...'));
$x=1;
while(preg_match($desen,$ac,$cik) OR (preg_match($desen2,$ac,$cik)) OR (preg_match($desen3,$ac,$cik))){
eval(str_replace('eval','$ac=',$ac));
$x++;
}
echo "<font color='red'>$x Desencryptografado(s)</font><br>";
$sonuc=('<?php
'.
$ac
.'');
}
echo "<h1>Resultado</h1>";
echo "<textarea cols=100 rows=20>$sonuc</textarea><br>";
echo "<h1>Código</h1>";
highlight_string($sonuc);
it does not decode using METHOD POSTas above.
more if I do it yes, it works
PHP Code:
$ac=@file_get_contents("script/coded.txt")
Comment