Ist es ein Fehler im Code oder in der Proxy ?
Code :
Code:
Imports System.Net Imports System.Threading Public Class Form1 Dim HitfakeThread As Thread Dim ProxyListe() As String Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim Open As New OpenFileDialog If Open.ShowDialog = Windows.Forms.DialogResult.OK Then TextBox2.Text = Open.FileName ProxyListe = Split(My.Computer.FileSystem.ReadAllText(TextBox2.Text), vbNewLine) End If End Sub Private Sub Hitfake() Dim Offline As Integer = 0 Dim Online As Integer = 0 Dim Abspeichern As String = Nothing Control.CheckForIllegalCrossThreadCalls = False For Each proxy As String In ProxyListe Try Dim IP_Adresse As String Dim Port As Integer IP_Adresse = Split(proxy, ":")(0) Port = CType(Split(proxy, ":")(1), Integer) Dim WProxy As New WebProxy(IP_Adresse, Port) Dim WClient As New WebClient WClient.Proxy = WProxy WClient.DownloadString(New Uri(TextBox1.Text)) Online += 1 Abspeichern &= proxy & vbNewLine Offline += 1 Catch ex As Exception ProgressBar1.Value += 1 Label9.Text = ProgressBar1.Value.ToString & "/" & ProxyListe.Count.ToString Label8.Text = Online.ToString Label7.Text = Offline.ToString End Try Next If CheckBox1.Checked Then My.Computer.FileSystem.WriteAllText(TextBox3.Text, Abspeichern, True) End If MsgBox("Fertig!", MsgBoxStyle.Information) ProgressBar1.Value = 0 Label9.Text = "0/0" Label8.Text = "0" Label7.Text = "0" Button3.Enabled = True Button4.Enabled = False End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Try If TextBox1.Text = "" Then MsgBox("Bitte geben sie einen Link ein !", MsgBoxStyle.Critical) Exit Sub End If If TextBox2.Text = "" Then MsgBox("Bitte wählen sie eine Poxyliste aus!", MsgBoxStyle.Critical) Exit Sub End If Button3.Enabled = False Button4.Enabled = True ProgressBar1.Maximum = ProxyListe.Count ProgressBar1.Value = 0 HitfakeThread = New Thread(AddressOf Hitfake) HitfakeThread.IsBackground = True HitfakeThread.Start() Catch ex As Exception MsgBox("Fehler:" & vbNewLine & "Die Proxyliste ist leer!") End Try End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Close() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Button4.Enabled = False Button3.Enabled = True HitfakeThread.Abort() ProgressBar1.Value = 0 End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged If CheckBox1.Checked Then If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then TextBox3.Text = SaveFileDialog1.FileName Else CheckBox1.Checked = False TextBox3.Clear() End If Else TextBox3.Clear() End If End Sub End Class