Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 001 Imports Microsoft.Win32
- 002 Public Class Form1
- 003 Dim proxy As New wvp
- 004 Dim one As String
- 005 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- 006 Button1.Enabled = False
- 007 helpfunction()
- 008 End Sub
- 009 Sub setproxy()
- 010 If Form2.ListBox1.Items.Count = 0 Then
- 011 If MsgBox(" No proxy countine?", vbYesNo, "") = vbYes Then
- 012 navigate()
- 013 Else
- 014 Button1.Enabled = True
- 015 Return
- 016 End If
- 017 Else
- 018 Try
- 019 If one = Nothing Then
- 020 Form2.ListBox1.SelectedIndex = 0
- 021 one = "FUCK !"
- 022 End If
- 023 Dim items As String = Form2.ListBox1.SelectedItem.ToString
- 024 Dim ip As String = items.Split(":"c).First
- 025 Dim port As String = items.Split(":"c).Last
- 026 Form2.ListBox1.SelectedIndex += 1
- 027 proxy.SetProxy(ip.ToString, Convert.ToInt16(port.ToString))
- 028 TextBox4.Text = "Wait for loading proxy..."
- 029 WaitCounter.Start()
- 030 Delay(20)
- 031 navigate()
- 032 Catch ex As Exception
- 033 If MsgBox("Bad proxy. Countine with out it?" + vbNewLine + " [" + ex.ToString + "]", vbYesNo, "") = vbYes Then
- 034 navigate()
- 035 Else
- 036 Return
- 037 End If
- 038 End Try
- 039 End If
- 040 End Sub
- 041 Private Function helpfunction()
- 042 setproxy()
- 043 End Function
- 044 Private Function navigate()
- 045 If TextBox1.Text = Nothing Then
- 046 MsgBox("No Link", vbOKOnly, "")
- 047 Button1.Enabled = True
- 048
- 049 Else
- 050 WebBrowser1.Navigate(TextBox1.Text)
- 051 TextBox4.Text = "Navigating borwser..."
- 052 WaitCounter.Start()
- 053 Delay(20)
- 054 Try
- 055 WebBrowser1.Document.GetElementById("skip_button").InvokeMember("click")
- 056 TextBox3.Text = TextBox3.Text + 1
- 057 TextBox4.Text = "Skip Button clicked !"
- 058 Delay(10)
- 059 setproxy()
- 060 Catch ex As Exception
- 061 TextBox4.Text = "Excaption!" & ex.ToString
- 062 TextBox5.Text = +1
- 063 Delay(10)
- 064 setproxy()
- 065 End Try
- 066 End If
- 067 End Function
- 068 Private Sub Wait_tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WaitCounter.Tick
- 069 TextBox2.Text = TextBox2.Text + 1
- 070
- 071 TextBox1.Enabled = False
- 072 Button1.Enabled = False
- 073
- 074 Button3.Enabled = False
- 075 Button4.Enabled = False
- 076 Button5.Enabled = False
- 077 If TextBox2.Text > 30 Then
- 078 WaitCounter.Stop()
- 079
- 080 TextBox1.Enabled = True
- 081 Button1.Enabled = True
- 082 Button3.Enabled = True
- 083 Button4.Enabled = True
- 084 Button5.Enabled = True
- 085 TextBox2.Text = 0
- 086 End If
- 087 End Sub
- 088 ' -------> ------> ------> ' Not used functions !
- 089 Sub Delay(ByVal dblSecs As Double)
- 090 Const OneSec As Double = 1.0# / (1440.0# * 60.0#)
- 091 Dim dblWaitTil As Date
- 092 Now.AddSeconds(OneSec)
- 093 dblWaitTil = Now.AddSeconds(OneSec).AddSeconds(dblSecs)
- 094 Do Until Now > dblWaitTil
- 095 Application.DoEvents() ' Allow windows messages to be processed
- 096 Loop
- 097 End Sub
- 098 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- 099 Form2.Show()
- 100 End Sub
- 101 Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
- 102 WaitCounter.Start()
- 103 Delay(20)
- 104 proxy.DisableProxy()
- 105 WebBrowser1.Navigate("http://www.ipaddrs.com/")
- 106 End Sub
- 107 Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
- 108 Process.Start("rundll32.exe", "shell32.dll,Control_RunDLL inetcpl.cpl")
- 109 End Sub
- 110 Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
- 111 Application.Restart()
- 112 End Sub
- 113 End Class
- 114 REM x M4TPAC
- 115 Public Class wvp
- 116 Sub DisableProxy()
- 117 Dim regKey As RegistryKey
- 118 Try
- 119 regKey = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Internet Settings", RegistryKeyPermissionCheck.ReadWriteSubTree)
- 120 regKey.SetValue("ProxyEnable", False, RegistryValueKind.DWord)
- 121 regKey.Close()
- 122
- 123 Catch ex As Exception
- 124 MsgBox(ex.ToString)
- 125 End Try
- 126 End Sub
- 127 Public Sub SetProxy(ByVal ServerName As String, ByVal port As Integer)
- 128 Dim regkey1 As RegistryKey
- 129 regkey1 = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Internet Settings", RegistryKeyPermissionCheck.ReadWriteSubTree)
- 130 regkey1.SetValue("ProxyServer", ServerName + ":" + port.ToString(), RegistryValueKind.Unknown)
- 131 regkey1.SetValue("ProxyEnable", RegistryKeyPermissionCheck.ReadWriteSubTree, RegistryValueKind.DWord)
- 132 regkey1.Close()
- 133 End Sub
- 134 End Class
- here the download http://adf.ly/S1Pqs
- here the source code http://adf.ly/SLGJV
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement