1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Seriouse 3 Problems makes Me Crazy ! VB.NET

Discussion in 'Visual Basic .NET' started by mou3ad15, Jul 21, 2013.

  1. mou3ad15

    mou3ad15 Newbie

    Joined:
    Aug 11, 2012
    Messages:
    4
    Likes Received:
    0
    hello guys,
    I've faced 3 problems, i've been looking in google for a solution but no result for now
    first problem is : how to user private proxy (ip:port:user:pass) in webbrowser control
    second problem is : how to grab variable captcha into picture box
    exemple : twitter mobile website
    their captchas have a link
    but that link gives diffirent captcha each time I reload the page
    so using that code will gives me another captcha picture in the picture box (not the same as the one in the webbrowser)

    PHP:
    for each elm as htmlelement in webbrowser1.document.all
    if elm.getattribute("src").contains("signup/captcha/"then
    picturebox1
    .load(elm.getattribute("src")
    end if
    next
    so whats the solution to get the right captcha picture in the picturebox please ?

    The last question is how to capture or track the requests sent by phone application (for exemple instagram account creating how to see what the application send as requests)
    and thank you
     
  2. r000k

    r000k Registered Member

    Joined:
    Jan 10, 2013
    Messages:
    66
    Likes Received:
    30
    all of these questions have been answered in previous threads in this section of the forum, if you search a little bit youll find them.
     
  3. mou3ad15

    mou3ad15 Newbie

    Joined:
    Aug 11, 2012
    Messages:
    4
    Likes Received:
    0
    well I did found a solution for the captcha problem

    but still can't find a way to add private proxy (user : pass : user : pass) to webbrowser control
    any way can help me with that ?
     
  4. mou3ad15

    mou3ad15 Newbie

    Joined:
    Aug 11, 2012
    Messages:
    4
    Likes Received:
    0
    Please any help how add private proxies to webbrowser ?? I know how to do it with httpweb requests but it seems hard on webbrowser !
     
  5. KirtiD

    KirtiD Newbie

    Joined:
    Jun 13, 2013
    Messages:
    49
    Likes Received:
    15
    Location:
    Beed
    you check proxybonanza on front page u will get code of vb for private proxy
     
  6. KirtiD

    KirtiD Newbie

    Joined:
    Jun 13, 2013
    Messages:
    49
    Likes Received:
    15
    Location:
    Beed
    and for captcha use following function to grab captcha
    create form with picture box on which we will show the image which is grab form web page , on same page put a text box and a submit button, in text box user will fill the captcha answer

    first check if captcha url is present on web page
    If link.GetAttribute("name") = "recaptcha_response_field" Or link.GetAttribute("name") = "security_code" Then
    copyImageToClipBoard()

    ---
    Dim doc As mshtml.IHTMLDocument2 = DirectCast(wbLogin.Document.DomDocument, mshtml.IHTMLDocument2)
    Dim imgRange As mshtml.IHTMLControlRange = DirectCast(DirectCast(doc.body, mshtml.HTMLBody).createControlRange(), mshtml.IHTMLControlRange)


    For Each img As mshtml.IHTMLImgElement In doc.images
    imgRange.add(DirectCast(img, mshtml.IHTMLControlElement))
    If img.src.Contains("action=verificationcode") Or img.src.Contains("/stats/register") Or img.src.Contains("action=regimage") Or img.src.Contains("/pun_antispam/image.php") Or img.src.Contains("recaptcha/api/image?c=") Or img.src.Contains("seccode.php") Or img.src.Contains("imagebuilder.php") Or img.src.Contains("CaptchaSecurityImages.php") Then
    imgRange.execCommand("Copy", False, Nothing)
    If My.Settings.isManual = True Then
    Using bmp As Bitmap = DirectCast(Clipboard.GetDataObject().GetData(DataFormats.Bitmap), Bitmap)
    Dim ofrmCap As New frmCaptcha(bmp)
    ofrmCap.BringToFront()
    ofrmCap.ShowDialog()
    mCaptcha = vars.mCaptcha
    vars.mCaptcha = Nothing
    End Using
    Else
    bgwDecaptcher.RunWorkerAsync(Clipboard.GetDataObject().GetData(DataFormats.Bitmap))
    End If
    End If
    Next
    Return mCaptcha
     
  7. kbrouder

    kbrouder Newbie

    Joined:
    Apr 25, 2013
    Messages:
    20
    Likes Received:
    4
    first problem is : how to user private proxy in webbrowser control
    ^ the short answer is you cant. The easy but not super great solution is you need to adjust the users settings to use a proxy. A webbrowser is basically IE, so that is really the only way I know to do it with a webbrowser. Of course then if your user is browsing the web at the same time they will be on the proxy. This may or may not be an issue depending on what you are trying to do.

    Better solution would be to not use a webbrowser, but in some cases I know that is the only way.

    If anyone knows how I would love to know too, but as far as I know you cant just change the proxy for only the webbrowser control.