Advertisement
LaPanthere

ThreadPool For Alpha

May 3rd, 2013
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 2.07 KB | None | 0 0
  1.    Try
  2.             'Program freezes when randusername is used. Fix is threading or local downloading of file.
  3.             ThreadPool.SetMaxThreads(threadsCB.SelectedItem.ToString, threadsCB.SelectedItem.ToString)
  4.             If Not _stop Then
  5.                 If getRB.Checked = True Then
  6.                     For i As Integer = 1 To requestNumNUD.Value
  7.                         Dim url As String = sanitizeInput(urlTB.Text)
  8.                         Dim crack As String = sanitizeInput(crackTB.Text)
  9.                         Dim fail As String = sanitizeInput(failTB.Text)
  10.                         Dim ua As String = sanitizeInput(uaTB.Text)
  11.                         Dim data As String = sanitizeInput(postDataTB.Text)
  12.                         Dim timeout As String = timeoutCB.SelectedItem.ToString
  13.                         Dim cookies As Boolean = cookieCB.Checked
  14.                         Threading.ThreadPool.QueueUserWorkItem(New WaitCallback(Sub() Bot(url, "GET", Timeout, sanitizeInput(ua), crack, fail, Data, cookies)))
  15.                     Next
  16.                 ElseIf postRB.Checked = True Then
  17.                     For i As Integer = 1 To requestNumNUD.Value
  18.                         Dim url As String = sanitizeInput(urlTB.Text)
  19.                         Dim crack As String = sanitizeInput(crackTB.Text)
  20.                         Dim fail As String = sanitizeInput(failTB.Text)
  21.                         Dim ua As String = sanitizeInput(uaTB.Text)
  22.                         Dim data As String = sanitizeInput(postDataTB.Text)
  23.                         Dim timeout As String = timeoutCB.SelectedItem.ToString
  24.                         Dim cookies As Boolean = cookieCB.Checked
  25.                         Threading.ThreadPool.QueueUserWorkItem(New WaitCallback(Sub() Bot(url, "POST", Timeout, ua, crack, fail, Data, cookies)))
  26.                     Next
  27.                 End If
  28.             Else
  29.                 UpdateInfo("Assiging failed, procedure is stopping")
  30.                 Exit Sub
  31.             End If
  32.         Catch ex As Exception
  33.             UpdateInfo("Assigning failed unknown error!")
  34.         End Try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement