Advertisement
Guest User

Blackchecker

a guest
Feb 27th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 5.58 KB | None | 0 0
  1. 'module Mod1
  2. Imports System.Net
  3. Imports System.IO
  4. Module Mod1
  5.     Public Function fileDialogg(ByRef a As Windows.Forms.FileDialog, ByRef b As String) As Boolean
  6.         Try
  7.             a.InitialDirectory = "C:\Users\%current user%\Desktop\"
  8.             a.Filter = "Text Files|*.txt"
  9.             a.ShowDialog()
  10.             b = a.FileName.ToString()
  11.             Return True
  12.         Catch ex As Exception
  13.             MsgBox("fd fail")
  14.             Return False
  15.         End Try
  16.     End Function
  17.     Public Function read1(ByVal location1 As String, ByRef output As ArrayList) As Boolean
  18.         Try
  19.             Dim lines() As String = IO.File.ReadAllLines(location1)
  20.             Dim lineArray As New ArrayList()
  21.             For x As Integer = 0 To lines.GetUpperBound(0)
  22.                 lineArray.Add(lines(x))
  23.             Next
  24.             output = lineArray
  25.             Return True
  26.         Catch ex As Exception
  27.             MsgBox("reading failure")
  28.             Return False
  29.         End Try
  30.     End Function
  31.     Public Function reqprxyCHECK(ByVal prox As String) As String
  32.         Try
  33.             Dim pppp As String() = prox.Split(New String() {":"}, StringSplitOptions.None)
  34.             Dim getR As HttpWebRequest = DirectCast(WebRequest.Create("http://www.shroomery.org/ythan/proxycheck.php?ip=" & pppp(0)), HttpWebRequest)
  35.             getR.Method = "GET"
  36.             getR.Proxy = New WebProxy(prox)
  37.             getR.Timeout = 10000
  38.             getR.Referer = "https://www.google.com/"
  39.             getR.UserAgent = "Mozilla/5.0 (Windows NT 6.1; rv:26.0) Gecko/20100101 Firefox/26.0"
  40.             Dim getResponse As HttpWebResponse
  41.             getResponse = DirectCast(getR.GetResponse(), HttpWebResponse)
  42.             Dim getRReader As New StreamReader(getResponse.GetResponseStream())
  43.             Dim thepage As String = getRReader.ReadToEnd
  44.             Return thepage
  45.         Catch ex As Exception
  46.             Return "F"
  47.         End Try
  48.     End Function
  49.     Public Function prxyCHECK(ByVal page As String) As Boolean
  50.         Try
  51.             If page.Contains("N") Then
  52.                 Return True
  53.             Else
  54.                 Return False
  55.             End If
  56.         Catch ex As Exception
  57.             Return False
  58.         End Try
  59.     End Function
  60. End Module
  61.  
  62.  
  63. 'form1
  64. Public Class Form1
  65.     Public unchecked As New ArrayList
  66.     Public spn As Integer
  67.     Public checked As String
  68.     Public Sub chk()
  69.         Me.BackColor = Color.Coral
  70.         For i = 0 To unchecked.Count - 1
  71.             If prxyCHECK(reqprxyCHECK(unchecked(i))) = True Then
  72.                 checked = checked & unchecked(i) & Environment.NewLine
  73.             End If
  74.         Next
  75.         Me.BackColor = Color.AliceBlue
  76.     End Sub
  77.     Public Sub chkMT()
  78. line1:  If spn <= unchecked.Count - 1 Then
  79.             Dim a As String = unchecked(spn)
  80.             spn += 1
  81.             If prxyCHECK(reqprxyCHECK(a)) = True Then
  82.                 checked = checked & a & Environment.NewLine
  83.                 Label5.Text = (Val(Label5.Text) + 1).ToString
  84.             End If
  85.             Label3.Text = (Val(Label3.Text) + 1).ToString
  86.             GoTo line1
  87.         Else
  88.             Exit Sub
  89.         End If
  90.     End Sub
  91.  #region "designs"
  92.     Dim drag As Boolean
  93.     Dim mousex As Integer
  94.     Dim mousey As Integer
  95.     Private Sub button3_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button3.MouseDown
  96.         drag = True
  97.         mousex = Windows.Forms.Cursor.Position.X - Me.Left
  98.         mousey = Windows.Forms.Cursor.Position.Y - Me.Top
  99.     End Sub
  100.     Private Sub button3_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button3.MouseMove
  101.         If drag = True Then
  102.             Me.Top = Windows.Forms.Cursor.Position.Y - mousey
  103.             Me.Left = Windows.Forms.Cursor.Position.X - mousex
  104.         End If
  105.     End Sub
  106.     Private Sub button3_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button3.MouseUp
  107.         drag = False
  108.     End Sub
  109.     Private Sub Button3_MouseWheel(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.MouseWheel
  110.         Me.WindowState = FormWindowState.Minimized
  111.     End Sub
  112.     Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
  113.         Me.Close()
  114.     End Sub
  115.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  116.         Me.ActiveControl = Button3
  117.         System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = False
  118.     End Sub
  119. #end region
  120.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  121.         fileDialogg(OpenFD1, TextBox1.Text)
  122.         read1(TextBox1.Text, unchecked)
  123.     End Sub
  124.  
  125.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  126.         SaveFD1.Filter = "TXT Files (*.txt*)|*.txt"
  127.         If SaveFD1.ShowDialog = Windows.Forms.DialogResult.OK Then
  128.             My.Computer.FileSystem.WriteAllText(SaveFD1.FileName, checked, True)
  129.         End If
  130.     End Sub
  131.     Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
  132.         Label2.Text = unchecked.Count.ToString
  133.         For i = 0 To 49
  134.             Dim th As System.Threading.Thread
  135.             th = New System.Threading.Thread(AddressOf chkMT)
  136.             th.IsBackground = True
  137.             th.Start()
  138.             Label7.Text = (Val(Label7.Text) + 1).ToString
  139.         Next
  140.     End Sub
  141. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement