THE FORUM IS IN READ-ONLY MODE
Passing captcha variable value to captcha solving block
Okay sorry if this is a question that was either answered a long time ago and I just didn't look deep enough in the forums or, worse, if this question has been answered multiple times already.
Anyways, I have a config here:
that is designed to solve an image captcha.
Here is the element action block to screenshot the captcha via x-path and output a variable called <CAP>.
I put this variable in a solve captcha block like this and specifically in the Base64 box:
and when I run the config, the screenshot of the captcha doesn't get solved instead I get the value of the captcha variable in my data screen like so:
Also I am running Captcha Monster in the background and I have also selected it in the settings of open bullet so it should be ready to solve captchas if their getting passed from open bullet. Let me know what you guys think, thanks.
Output variable needs to be CAP not <CAP>. You write <CAP> only when you want variable replacement to occur, a.k.a. when you're USING the variable not CREATING it.
Okay so I made the output variable of the element action block CAP and then in the Solve Captcha block the variable is inputted as <CAP>.
I tried this and I'm getting the same screen as above with the value of the captcha variable being displayed in my log window of the open bullet screen and no sign that the data was passed to be solved.
The only thing I can think of to change was to stop taking a screenshot in 64 base and just take a normal screenshot. The element action block executed fine but again the solve captcha block didn't bother to do anything. So I guess I'll just keep the element action block taking a 64base screenshot of the captcha since there doesn't seem to be any problem with the element action block. Thanks.
The variable is printed regardless of what you choose, for logging. But after your element action block, the solve captcha block should be executed, apparently it's not executed for some reason and the bot ends before that. I need to be able to reproduce it, can you hack together a sample config that reproduces the issue and that you can share with us?
communistseed last edited by Br4uN
Sorry for the delay here is the config in loliscript:
#OPEN_CHROME BROWSERACTION Open
**CENSORED**" 30 BanOnTimeout=FALSE
#OPEN_NEW_ACCOUNT BROWSERACTION SendKeys "<TAB>||<ENTER>"
#INPUT_E-MAIL BROWSERACTION SendKeys "<USERNAME>||<TAB>||<ENTER>||<ARROWDOWN>||<ENTER>||<TAB>||<ENTER>"
#INPUT_PASSWORD BROWSERACTION SendKeys "<PASSWORD>||<TAB>||<TAB>||<TAB>||<TAB>||<TAB>||<ENTER>"
#INPUT_NAME BROWSERACTION SendKeys "moron||<TAB>||exam||<TAB>||<ENTER>"
#INPUT_BIRTHDATE BROWSERACTION SendKeys "<TAB>||<ARROWDOWN>||<TAB>||<ARROWDOWN>||<TAB>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<ARROWDOWN>||<TAB>||<ENTER>"
ELEMENTACTION XPath "/html/body/div/div/div/div/div/div/div/div/div/div/div/div/form/div/div/img"
ScreenshotBase64 -> VAR "CAP"
SOLVECAPTCHA ImageCaptcha "<CAP>" NotSpecified English 0 10 BothNumbersAndLetters ""
Also to note the data box at the top right should be filled out with credentials of a Username and a Password with the following variables <USERNAME> and <PASSWORD>. You should be able to use whatever you come up with so long as it is <USERNAME>:<PASSWORD>. Let me know what you think and thank you so much.
This post is deleted!
Okay so I found out what the problem was. Every time I was running my config I would get an error box from open bullet saying "missing client HIP object". Apparently I either didn't seem to mind or notice what the error box was doing to my config and so didn't bother it any attention. However, the error box kept halting my config when it was either executing the element action block or the solve captcha block.
So I found this thread: https://forum.openbullet.dev/topic/1131/missing-client-hip-object and it got rid of the error message.
However, that isn't the end of my problem, for the solve captcha block still isn't working and a new error is popping up instead in the the log box.
When executing SOLVE CAPTCHA BLOCK I get the error "Invalid URI: The hostname could not be parsed".
Just some extra information I changed my variable "CAP" to "CAPT" and made the necessary changes to make sure the variable is passed. As you can see from the picture, the element action block is capturing the base64 screenshot variable value successfully, even if the picture is only showing part of that value.
Okay another update I guess:
Got rid of the "Invalid URI: The hostname could not be parsed." error and now have a new error:
At this point I'm just updating my progress on this and if anyone has any idea what they think could work for my config, let me know. Thanks.
- What captcha service are you using?
- Check your windows hosts file, maybe you have some leftover lines from xevil/capmonster
- Captcha Monster
- I'm only using captcha monster and I'm not sure where the windows hosts file would be located.
Did you configure it correctly in OB's settings? Are you on latest 1.2.2?
I have version 1.2.2.
In the settings I have it configured for CapMonster. I didn't enter an API key or a Domain, the port is on 80. Also my settings for my captcha monster program are set to 80 for port as well. Thanks.
I'm afraid to say that I have absolutely no idea why this is happening sorry
I'll message you if I find anything else out. Thanks.