【发布时间】:2018-09-09 10:50:57
【问题描述】:
我正在使用 PHPMailer 使用我的 gmail 帐户发送电子邮件。如果我使用 REST 客户端访问 PHP 文件,它会为我提供各种客户端服务器通信数据,其中我发现我自己的 gmail 用户名和密码是用 base64 编码发送的,任何人都可以使用类似的工具轻松地将其反转为纯文本burpsuite 拦截。这个 PHP 文件是使用 ajax 调用的,我得到了所有响应该 PHP 文件的信息。如何阻止 PHP 文件将此信息发送到客户端?
部分设置如下:
require_once('class.phpmailer.php');
include 'class.smtp.php';
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->Host = "ssl://173.194.67.109"; // sets GMAIL as the SMTP server
$mail->Port = 465;
【问题讨论】:
标签: php email smtp gmail smtp-auth