Skip to content

Posting 'g-recaptcha-response' data to a different parameter

cherubcherub SERnuke.com
I'm looking at scripting a site that uses recaptcha, but wants the data for 'g-recaptcha-response' as a different parameter, in this case 'user[recaptcha]'

I've tried using:
user[recaptcha]=%captcha%

...but SER just adds this line of data to the POST
g-recaptcha-response=03AGdBq27NHw-3QzvJhYyu9aXRR84YNt5jAqcdzg...<cut>...SQXKws_sDk8

Is there anything I can do here?
Tagged:

Comments

  • SvenSven www.GSA-Online.de
    user[recaptcha]=%recaptchav2% <<< this should work...even though it should also work for v3...i will also support %recaptcha% in next update.
    Thanked by 1cherub
  • cherubcherub SERnuke.com
    I've given that a go, now it seems to be sending the wrong site key to the captcha solver
    For some reason it's cutting the first two characters of the site key, which are 6L
  • cherubcherub SERnuke.com
    Going back to user[recaptcha]=%captcha% I get the same result now too. I'm running v15.48
  • SvenSven www.GSA-Online.de
    ok i think the problem is in latest update...will have to fix that sorry.
  • SvenSven www.GSA-Online.de
    another option would be to use:
    recaptcha default varname=user[recaptcha]
  • cherubcherub SERnuke.com
    Thanks for your efforts Sven but I'm not having any success. I've tried:

    user[recaptcha]=%captcha%
    user[recaptcha]=%recaptchav2%
    user[recaptcha]=%recaptcha%
    recaptcha default varname=user[recaptcha] (in the [SETUP] section right?)

    ...but they're all posting an empty value for user[recaptcha] and adding the g-recaptcha-response field.

    The only partial success I've had is by adding some fixed data to the form eg.

    add fixed data=user[recaptcha]=%recaptcha% hardcoded-sitekey-here

    ...but this results in 2 different recaptchas being sent to the solver and both being added to the form post: 

  • SvenSven www.GSA-Online.de
    don't add it to SETUP but the section where this is used.
    Thanked by 1cherub
  • cherubcherub SERnuke.com
    The 'recaptcha default varname' option worked, thanks!
  • AliTabAliTab https://gsaserlists.com
    This topic saved me a lot of time :) Thank you @cherub

    would be nice to be added to the script manual @Sven please B)
    %recaptcha% and recaptcha default varname
  • cherubcherub SERnuke.com
    @sven do you have any idea why when using
    recaptcha default varname=recaptcha-token

    a blank variable will be sent along with the recaptcha response, as in the image below?
    The script I'm working on is throwing captcha error messages at me, just wondering if it could be the blank 'recaptcha-token' being sent that is causing it.
  • SvenSven www.GSA-Online.de
    are you adding this with "add fixed data" as well?
  • cherubcherub SERnuke.com
    I am adding some fixed data but not the recaptcha-token. This is the code
    recaptcha default varname=recaptcha-token
    
    post_id=%leave%
    c_1=%datetime-u%
    c_2=%leave%
    post_comment=%blog_comment%
    
    form request with=XMLHttpRequest
    
    add fixed data=c_1=%datetime-u%
  • SvenSven www.GSA-Online.de
    Do you mind sharing that whole engine? I can't locate the issue and need to run it in debugger.
  • cherubcherub SERnuke.com
    Sending in PM
  • cherubcherub SERnuke.com
    More fun and games with recaptcha! This time I've found a site that needs to send the recaptcha response in... a HTTP header!

    I've tried the following with no luck:
    http header=recaptcha-token=%recaptcha% 6Lhardcodedsitekeyhere

    I've shelved the engine for the time being as I don't expect this to be used much. But if you ever have a spare moment and think it's worth adding it might be useful.
  • SvenSven www.GSA-Online.de
    http header=recaptcha-token: %recaptcha% 6Lhardcodedsitekeyhere << a change from "=" to ":" should work.
  • cherubcherub SERnuke.com
    Unfortunately not, it still just prints %recaptcha% and the sitekey as the header content. I'm having another play around with it but I'll send you the engine to look at later if you ever have some spare time ;)
  • SvenSven www.GSA-Online.de
    yes might be best to debug this live.
  • cherubcherub SERnuke.com
    edited June 2022
    Another little issue with the %recaptcha% macro. I'm wanting to send it using post data=
    If I use something like this:
    recaptcha sitekey=6Lf5-tMUAAAAAEV_E8kmifm1a50zroqPwOimcn3J
    recaptcha default varname=recaptcha
    post data=username=%login%&password=%password%&email=%your e-mail%&recaptcha=%recaptcha%
    it will send the request with the recaptcha response fine

    If I want to use post data like this
    post data=payload={"username":"%login%","password":"%password%","email":"%your e-mail%","recaptcha":"%recaptcha%"}
    Then the %login%, %password% and %your e-mail% macros are sent, but %recaptcha% remains as %recaptcha%. I've tried all combinations of 'encode post data' but no avail. Would something like this be possible?
  • SvenSven www.GSA-Online.de
    Thats true. This is not handled like a normal var=content submission as it's json encoded. I can try adding support for it though.
    Thanked by 1cherub
  • cherubcherub SERnuke.com
    Would be great if possible.
Sign In or Register to comment.