zoukankan      html  css  js  c++  java
  • python写一个邮箱伪造脚本

    前言:

    原本打算学php MVC的思路然后写一个项目。但是贼恶心,

    写不出来。然后就还是用python写了个邮箱伪造。

    0x01

    第一步先去搜狐注册一个邮箱

    然后,点开设置,开启SMTP服务。

    当然你也可以用其他的邮箱,

    1开启SMTP服务

    0x02

    代码分析

    import smtplib
    from email.mime.text import MIMEText
    from email.header import Header
    zhengwen=input('请输入正文:')
    fajianr=input('请输入发件人:')
    shoujianr=input('请输入收件人:')
    zhuti=input('主题:')
    messeng=MIMEText(zhengwen,'plain','utf-8')#正文
    messeng['From']=Header(fajianr,'utf-8')#发件人
    messeng['TO']=Header(shoujianr,'utf-8')#收件人
    subject=zhuti#主题
    messeng['Subject']=Header(subject,'utf-8')
    def yxwz():
      try:
        smtp=smtplib.SMTP()
        smtp.connect('smtp.sohu.com','25')
        smtp.login('你的搜狐邮箱','你搜狐的密码')
      smtp.sendmail('你的搜狐邮箱'['目标邮箱'],messeng.as_string())
        smtp.quit()
        print('[*]邮件发送成功')
      except Exception as e:
          print('[-]发送失败,报错原因:',e)
    yxwz()
    

      运行截图

     github地址:https://github.com/422926799/python

  • 相关阅读:
    Making a CocoaPod
    关于Http
    The podfile
    iOS 8个实用小技巧(总有你不知道的和你会用到的)
    关于深拷贝浅拷贝
    适配ios10(iTunes找不到构建版本)
    iOS 10 推送的简单使用
    __block 和 __weak的区别
    Masonry使用注意事项
    iOS数字键盘自定义按键
  • 原文地址:https://www.cnblogs.com/haq5201314/p/8328772.html
Copyright © 2011-2022 走看看