Results 1 to 11 of 11

Thread: [HELP] VB6 Captcha Verifier

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    23

    Post [HELP] VB6 Captcha Verifier

    Hi guys, i'm making a program with Captcha. And i'm stuck with the verify of the captcha can someone help me?




    Code:
    Private Sub MakeCaptchaImage(ByVal pic As PictureBox, ByVal _
        txt As String, ByVal min_size As Integer, ByVal _
        max_size As Integer)
    Dim wid As Single
    Dim hgt As Single
    Dim ch_wid As Single
    Dim i As Integer
    Dim font_size As Single
    Dim ch As String
    Dim X As Single
    Dim Y As Single
    Dim prev_angle As Single
    Dim angle As Single
    Dim x1 As Single
    Dim y1 As Single
    Dim x2 As Single
    Dim y2 As Single
    
       
        wid = pic.ScaleWidth
        hgt = pic.ScaleHeight
        ch_wid = wid / Len(txt)
        prev_angle = 0
        pic.Cls
        Randomize
        For i = 1 To Len(txt)
            ch = Mid$(txt, i, 1)
            font_size = min_size + Rnd * (max_size - min_size)
    
         
            X = (i - 0.75 + Rnd * 0.5) * ch_wid
            Y = hgt / 2 + Rnd * (hgt - pic.ScaleY(font_size, _
                vbPoints, vbTwips))
    
        
            angle = prev_angle
            Do While Abs(angle - prev_angle) < 10
                angle = -20 + Rnd * (20 - -20)
            Loop
            prev_angle = angle
            DrawCenteredRotatedText picCaptcha, ch, X, Y, _
                angle, font_size
        Next i
        For i = 1 To 10
            x1 = Rnd * wid
            y1 = Rnd * hgt
            x2 = Rnd * wid
            y2 = Rnd * hgt
            pic.Line (x1, y1)-(x2, y2)
        Next i
        For i = 1 To 10
            x1 = Rnd * wid
            y1 = Rnd * hgt
            x2 = Rnd * wid
            y2 = Rnd * hgt
            pic.Line (x1, y1)-(x2, y2), vbWhite
        Next i
    End Sub
    
    
    Private Sub VerifyCaptcha()
    End Sub

  2. #2
    Hyperactive Member Lenggries's Avatar
    Join Date
    Sep 2009
    Posts
    353

    Re: [HELP] VB6 Captcha Verifier

    What are you trying to verify? The user's input? Just compare it to the "txt" parameter you passed to MakeCaptchaImage()

  3. #3
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [HELP] VB6 Captcha Verifier

    I'm assuming that your MakeCaptchaImage function works. So you create the captcha image and display it on a Web page or whatever and the image will have some kind of text string embedded into it for which the user must copy and type into a textbox. Well, like Lenggries stated, you just compare what the user typed in to a value in your app (a string variable, I assume) that contains the correct text. Is this your problem or does it go beyond what is being said to you? Maybe your problem is how do you get the text the user typed in off the Web page perhaps, I don't know how you are handling this.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [HELP] VB6 Captcha Verifier

    Web page?

    I was assuming he was protecting a real program in VB6 against window-hijacker programs. My fix is to use windowless controls as much as possible - nothing to be exploited, at least not easily.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    23

    Re: [HELP] VB6 Captcha Verifier

    i'm sorry i still can't do it the full code, any help?

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    23

    Re: [HELP] VB6 Captcha Verifier

    mine..

  7. #7
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [HELP] VB6 Captcha Verifier

    Why don't you reply to questions? Like mine in post 3


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    23

    Re: [HELP] VB6 Captcha Verifier

    Quote Originally Posted by jmsrickland View Post
    Why don't you reply to questions? Like mine in post 3
    Sorry
    first: i didn't see your post.
    second: i'm a freakenly newbie here man
    It's Kinda helpfull your post but, it is 829 students can it be more randomizable? Are u meaning this:

    Dim Var as String
    Var = "123"
    ?
    Last edited by DumperJet; Dec 13th, 2012 at 04:21 PM.

  9. #9
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [HELP] VB6 Captcha Verifier

    No, I was talking about how you get the captcha text that the user entered and see if it is the same text on your captcha(verifying, isn't that your question?)


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    23

    Re: [HELP] VB6 Captcha Verifier

    Quote Originally Posted by jmsrickland View Post
    No, I was talking about how you get the captcha text that the user entered and see if it is the same text on your captcha(verifying, isn't that your question?)
    Well some human eyes and inject the string that will do

  11. #11
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [HELP] VB6 Captcha Verifier

    You are as clear as mud. I guess you don't really care about help with your captcha verifier


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width