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

Html Element ~ how can you grab Java code that the captcha is embedded into?

Discussion in 'Visual Basic .NET' started by simpleonline1234, May 17, 2011.

  1. simpleonline1234

    simpleonline1234 Junior Member

    Joined:
    Jan 26, 2010
    Messages:
    169
    Likes Received:
    13
    This one new to me. I am trying grab the yahoo email captcha to display into a picture box so that I can solve it manually.

    The source file doesn't have anything to grab...it looks like it's in Java or something.

    Here is the source code. Got any ideas on how to grab the source code for the captcha? Thanks

    Code:
    var pageConfig = {
    
        enableYidHelper:true,
        showCaptcha:1,
        cURL: "https://ab.login.yahoo.com/img/5O3zfOJZFekXA706XjXvqTHYol1L.oDNmC2gR3RM7VrKa0YhsArvLzuDFXB2Bp8Me0mQz2i06Av23YKgOAvo2_OTCMpywcyyh.eSTw--.jpg",
        xyz: 0,
        enableSocRegUAValidation : false,
        rtlIntl : "",
        tmpdata: "n1z_0WlL_LLX2Nv8xzxL0x8TtAZ5pwIrIWOSo2WTpkglTQqHXSE4IumKP58n.HeYtpaM_a4nAdMGPwJ8RI_E3_x30n69G7fvVVoYmICrdd14254e3K56uVgeELaoTIc-~B",
        displayCustomQuestion1 : false,
        displayCustomQuestion2 : false,
        isZipValidatorEnabled : true,
        setValue: true,
        enabledFLvlRep: false,
        isCustomQuestionsEnabled : true,
        noZipCountryList : "al,at,sn,ae,af,ag,ai,an,ao,aw,bb,be,bf,bi,bj,bn,bo,bs,bt,bw,bz,cd,cf,cg,ci,ck,cl,cm,co,cu,cv,dj,dm,do,ec,eh,er,et,fi,fj,fk,ga,gd,gh,gi,gm,gn,gq,gs,gy,ie,io,iq,jm,kh,ki,km,kn,kp,kw,ky,lb,lc,lr,ls,ly,ml,mm,mr,ms,mu,mw,na,ne,ng,ni,nl,nr,nu,pa,pe,pi,pn,qa,rw,sa,sb,sc,sh,sl,so,st,sy,tc,td,tg,tk,to,tt,tv,tz,vc,vg,vn,vu,ws,xd,xe,xx,ye,zw,ug,hk,tf,sj,aq,bv,hm,mo,sr,ua,kr,bd,in,mv,np,pk,lk,mn,ir,id,la,my,pg,ph,sg,th,tl,tr,bh,om,il,jo,cy,eg,am,az,ge,kz,uz,tm,tj,kg,dz,ma,sd,tn,er,so,ps",
        enableCoDomain: "",
        enableCaptchaV5: 1,
        intl : "us"
    };
    
    
     
  2. GodaddysDeadElephant

    GodaddysDeadElephant Registered Member

    Joined:
    May 16, 2011
    Messages:
    54
    Likes Received:
    13
    Mate, its not in java its this URL:
    Java has nothing to do with it, its the CURL URL
     
  3. simpleonline1234

    simpleonline1234 Junior Member

    Joined:
    Jan 26, 2010
    Messages:
    169
    Likes Received:
    13
    Oh..okay...so how would I be able to grap the cURL and is it in my application? I tried to call it by cURL and I didn't have an attribute to use.

    Normally I can snag an ID, name, or Inner Text, but this looks chinese to me. Any ideas?
     
  4. xhpdx

    xhpdx Regular Member

    Joined:
    Sep 21, 2008
    Messages:
    331
    Likes Received:
    2,160
    Occupation:
    Coder
    Location:
    EU
    I assume you are using the webbrowser control. So what you will need to do is a little string play with the source code of the page. Basically you will need to use string.indexof,string.substring and again string.indexof. Let me know if it is still not clear.
     
  5. shudogg

    shudogg Regular Member

    Joined:
    Sep 23, 2008
    Messages:
    412
    Likes Received:
    153
    Occupation:
    Internet Marketing
    Location:
    Indiana
    Home Page:
    I didn't check it, but I assume that the URL located on the cURL line is the real cached captcha image.
    Code:
    cURL: "https://ab.login.yahoo.com/img/5O3zfOJZFekXA706XjXvqTHYol1L.oDNmC2gR3RM7VrKa0YhsArvLzuDFXB2Bp8Me0mQz2i06Av23YKgOAvo2_OTCMpywcyyh.eSTw--.jpg",
    You could use a regex expression.

    You could just use a "for each line in string" method to loop through each line, then use
    Code:
    if line.contains("https://ab.login.yahoo.com/img/") then
    Exit the for each loop. With that line, strip the beginning and end, or use regex, to sift out only the full url.

    Use HTTP WebRequest to request the url of the captcha, and download as binary, saving the image to the hard drive/temp folder. If using a captcha service, send the captcha image to them.. ect...

    And note that I said WebRequest, not WebBrowser. bots/apps that use web browsers are my biggest pet peeve. Majority of the time, if you see an app that is using web browsers to do everything, it is because the programmer is an amateur and doesn't know how to use webrequests.