How to make imacro to select/solve the captcha?(RecaptchaV2)

元气小坏坏 提交于 2020-01-03 03:42:07

问题


I edited some code to auto solve recaptcha v2. I get the numbers from api of 2captcha/9kw and all is perfect!

But after I get the numbers. LIKE: 258 How can I make each number to select this box?

This is the code I have for this part: (but its not select the specific numbers, its select all the photos)

Please if someone know how to fix it, please help.

'Fill the recognized characters to the verification box (Click the pictures 1..9)

FRAME F=2
SET !ERRORIGNORE YES

SET 1 EVAL("var s=\"{{answer}}\"; if(s.match(/^[0-9]+$/) && s.length <= 9 && s.length >= 2) s.substr(0,1); else MacroError(\"Captcha answer is wrong.\")")
TAG POS=1 TYPE=IMG ATTR=SRC:https://www.google.com/recaptcha/api2/payload?c=*

SET !ERRORIGNORE NO``

回答1:


It's imacros. There is the 9kw API recaptcha v2 example for imacros in javascript and jquery with your features as recaptcha_v2_jquery.js: https://www.9kw.eu/grafik/plugins/9kweu_recaptcha_v2.zip

Then you have the full imacros solution in iim, javascript and javascript with jquery. And you can use any other servies with change few lines.

I cannot quote very long examples (no attachments possible on stackoverflow) and the downloadlink is online since years.

Or you can use imacros with javascript/jquery and then you can check/grab it with javascript. See iMacros Http POST to API endpoint

Small snippet to use the answer with your elements as core code with jquery:

var answer = "853";
var myarray = answer.split('');
if(myarray.length > 1){
	for(var i = 0;i < myarray.length; i++){
		if(myarray[i].match(/^[0-9]+$/)){
			myarray[i] = parseFloat(myarray[i]) - 1;
			if(myarray[i] == ""){
				myarray[i] = 0;
			}
			$('iframe').contents().find('html').find(".rc-image-tile-wrapper").eq(myarray[i]).click();
		}
	}
}



回答2:


I haven't tried to solve this but I did look into this. You have to use EVENT command and experimental recording. When u send the new recaptcha image to DBC they will send something like this [(4),(1),(2)].

With little JS code and EVENT command you can use the numbers above to click on matching positions of images.




回答3:


there is the imacros 2captcha API example: https://www.dropbox.com/s/bmex7ya4xv510jo/Imacros%20API%20Example.zip?dl=0 but does not integrated reportbad feature.



来源:https://stackoverflow.com/questions/35297049/how-to-make-imacro-to-select-solve-the-captcharecaptchav2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!