##################################################' ## Deactive Cheker Example Source ##
' ##----------------------------------------------##
' ## ##################################################
Option Explicit
Private Sub Command1_Click()
'Fill Filed's By Them ID's
WB.Document.GetElementById("login").Value = Text1.Text
WB.Document.GetElementById("captchaV5Answer").Value = Text2.Text
WB.Document.GetElementById("saveBtn").Click
DoEvents
Sts.Caption = "Cheking..."
Timer2.Enabled = True
End Sub
Private Sub Form_Load()
'Load URL In WebBrowser
WB.Navigate "https://edit.yahoo.com/forgot?stage=fe100&src=&intl=us&done=http://www.yahoo.com&partner="
Sts.Caption = "Loading Server..."
Timer.Enabled = True
End Sub
Private Sub Timer_Timer()
Text1.Enabled = False
Text2.Enabled = False
Text1.Text = "Yahoo ID"
Text2.Text = "Capcha Answer"
If WB.Busy = False Then 'Check For WebBrowser Is Not Busy
Timer.Enabled = False
Call LoadCap
End If
End Sub
Private Sub Timer2_Timer()
Text1.Enabled = False
Text2.Enabled = False
If WB.Busy = False Then 'Check For WebBrowser Is Not Busy
Timer2.Enabled = False
Call chk
End If
End Sub
Private Sub LoadCap()
Dim CP() As Byte, FH As Long
Dim UL As String, FN As String, Com As String
Com = WB.Document.body.innerhtml 'Get Page Source
Sts.Caption = "Loading Capcha URL..."
If Len(Com) < 18000 Then 'Compare If Capcha URL Exist In Page Source It Len Must By > 1800
Timer.Enabled = True
Exit Sub
End If
Sts.Caption = "Loading Capcha Image..."
UL = WB.Document.GetElementById("captchaV5ClassicCaptchaImg").Src 'Get Capcha Image URL
CP = Inet.OpenURL(UL, icByteArray) 'Download Capcha Image
FH = FreeFile
FN = "C:\Av.jpg"
Open FN For Binary As #FH
Put #FH, , CP 'Write Capcha Image To File
Close #FH
Pic.Picture = LoadPicture(FN) 'Load Capcha Image
Pic.Refresh
Kill FN
Sts.Caption = "Capcha Image Loaded."
Text1.Text = ""
Text2.Text = ""
Text1.Enabled = True
Text2.Enabled = True
Text1.SetFocus
End Sub
Private Sub chk()
Dim Com As String
'Chek Text's Exist In Page For ID Status
If InStr(WB.Document.body.innertext, "We couldn't match the Yahoo! ID you entered with information in our database.") Then
Label2.Caption = "Wrong ID"
ElseIf InStr(WB.Document.body.innertext, "The security code you entered wasn't correct.") Then
Label2.Caption = "Invalied Capcha"
ElseIf InStr(WB.Document.body.innertext, "Your password can’t be reset online.") Then
Label2.Caption = "Deavtivated"
Else
Label2.Caption = "Active"
End If
Call Form_Load 'Reload Capcha Image
End Sub