• captcha.src

    From Digital Man@VERT to Lord Blackfair on Thu Jul 29 12:19:00 2021
    Here's the code you emailed me (please post here in the future instead):

    #Captcha program by Keith Cunningham edit to how you would like
    !include sbbsdefs.inc
    :Home
    INT I
    STR S
    RANDOM I 999999
    CLS
    Print "\r\nWelcome to the Login Captcha.\r\n"
    Print "\r\nTo prove you are not a BOT please enter the number below below.\r\n" PRINT ""
    PRINT ""
    print I
    print "\r\n"
    GETSTR STR 6 K_NUMBER
    COMPARE I S
    IF_false
    goto wrong
    Print "\r\n\r\nWelcome to the BBS!!!\r\n\r\n"
    pause
    end_if
    end_cmd
    # edit this line as to Where you would exit to
    :wrong
    Print "\r\nThat is not correct, Please try again.\r\n"
    pause
    goto home
    end_cmd

    I see a couple of issues:
    1. The first end_if should be placed right after your "goto wrong" statement. Nothing following that "goto" will be executed in the "else" case, which it appears you intended.
    2. The end_cmd's don't appear to belong here at all since you have no corresponding cmd_home statement (nor do you necessarily want/need one for such a simple script).

    Here's a simplified version which I think does what you want:
    #Captcha program by Keith Cunningham edit to how you would like
    !include sbbsdefs.inc
    :Home
    INT I
    STR S
    RANDOM I 999999
    CLS
    Print "\r\nWelcome to the Login Captcha.\r\n"
    Print "\r\nTo prove you are not a BOT please enter the number below below.\r\n" PRINT ""
    PRINT ""
    print I
    print "\r\n"
    GETSTR STR 6 K_NUMBER
    COMPARE I S
    IF_true
    Print "\r\n\r\nWelcome to the BBS!!!\r\n\r\n"
    pause
    return
    end_if
    Print "\r\nThat is not correct, Please try again.\r\n"
    pause
    goto home
    --
    digital man

    Sling Blade quote #8:
    Karl Childers: I don't reckon I got no reason to kill nobody.
    Norco, CA WX: 90.9øF, 35.0% humidity, 8 mph ENE wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From MRO@VERT/BBSESINF to Digital Man on Thu Jul 29 16:04:00 2021
    Re: captcha.src
    By: Digital Man to Lord Blackfair on Thu Jul 29 2021 04:19 pm

    Here's the code you emailed me (please post here in the future instead):

    #Captcha program by Keith Cunningham edit to how you would like
    !include sbbsdefs.inc


    My capcha script adds them to an ip blocklist first, then removes that entry if they pass the challenge code. that way it gets the bots.

    which doesnt really do much because sometimes i have one guy attacking me so much it just drags down synchronet. then he goes in my firewall.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::