Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' make a request and grab the source
- Dim sSource As String = MakePostRequest(_ForumURL & "member.php", sPost)
- ' if we need to handle the captcha
- If sSource.Contains("captcha_img") Then
- ' tell the user what we're doing
- RaiseEvent StatusReceived("Captcha needed")
- ' get the imagehash needed to fetch the captcha
- Dim sFind As String = "?imagehash="
- Dim sImageHash As String = sSource.Substring(sSource.IndexOf(sFind) + sFind.Length, 32)
- ' tell the user what we're doing
- RaiseEvent StatusReceived("Fetching Captcha..")
- ' create an instance of frmCaptcha
- Dim fCaptcha As New frmCaptcha
- ' fetch the captcha and set the image in frmCaptcha
- fCaptcha.CaptchaImage = FetchCaptch(sImageHash)
- ' show dialoge prevents them from using frmMain
- fCaptcha.ShowDialog()
- ' grab what they typed in then dispose the form
- Dim sImgageString As String = fCaptcha.Answer
- fCaptcha.Dispose()
- ' create new post data
- sPost = "username=" & Username & "&password=" & Password + "&remember=yes" + "&imagestring=" + sImgageString + "&imagehash=" + sImageHash + "&submit=Login&action=do_login&url=" & _ForumURL & "member.php?action=login"
- ' tell the user what we're doing
- RaiseEvent StatusReceived("Sending Captcha")
- ' send the captcha and grab a new source
- sSource = MakePostRequest(_ForumURL & "member.php", sPost)
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement