Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
根据 RFC 5321 实现简单的邮件服务器
pip install smtp_server
python -m smtp_sever [port]
不加port
参数默认使用25
端口
import smtplib
from email.mime.text import MIMEText
from email.utils import formataddr
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
msg = MIMEMultipart('related')
msg['From'] = formataddr([""])
msg['To'] = formataddr(["", ""])
msg['Subject'] = "测试邮件"
#文本信息
txt = MIMEText('Python发送邮件测试', 'plain', 'utf-8')
msg.attach(txt)
#附件信息
# attach = MIMEApplication(open(u"X.xlsx","rb").read())
# attach.add_header('Content-Disposition', 'attachment', filename='A.xlsx')
# msg.attach(attach)
server = smtplib.SMTP('127.0.0.1', 25)
server.sendmail("faker@from-domian.com", "another-email@target-host.com", msg.as_string())
server.quit()
PYSMTP_SERVER_DOMAIN
FAQs
Simple SMTP Server Demo
We found that smtp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.