PHP伪造发件人发送邮件

low

<!DOCTYPE html>
<html>
<head>
    <title>bzcfuzxgieeycagf</title>
    <meta http-equiv=Content-Type content="text/html;charset=utf-8">
</head>
<body>
<form action="#" method="POST">
需要伪造的发件人 : <input type="text" name="headers"></input>格式如('管理员&lt;root@gov.cn&gt;')<br><br>
邮件标题: <input type="text" name="subject"></input><br><br>
邮件内容:<textarea name="body"></textarea><br>
发送给:  <input type="text" name="to"></input><br>
    <input type="submit" name="sub" value="发送">
</form>


</body>
</html>


<?php 


if (isset($_POST['sub'])){
    $headers=$_POST['headers'];
    $headers='From:'.$headers;
    $subject=$_POST['subject'];
    $body = $_POST['body'];
    $to = $_POST['to'];

    if (mail($to, $subject, $body,$headers)) {
        echo "发送成功";
    }else{
        echo "发送失败";
    }
} 


?>

标签: none

添加新评论