HaHaItsJake 25 Posted March 16, 2017 Report Share Posted March 16, 2017 I've been trying to get the 2Captcha API to work with HTTP Upload for sometime now and all I'm getting back is ERROR_ZERO_CAPTCHA_FILESIZE with any captcha image I use. Am I missing something with 2Captcha? set(#CAPTCHAAPI, "", "Global")set(#RespondsUpload, $plugin function("HTTP post.dll", "$http upload", "http://2captcha.com/in.php", "key={#CAPTCHAAPI}&method=post&json=1", "{$special folder("Desktop")}\\captcha.jpg", "captchafile", "image/jpeg", "", "", "", ""), "Global") [solved] - My connection was blocking the file upload[EDIT] - Not my connection, was the wrong API method. Method=Post is correct, still error ERROR_ZERO_CAPTCHA_FILESIZE Quote Link to post Share on other sites
HelloInsomnia 1103 Posted March 17, 2017 Report Share Posted March 17, 2017 You can use Advanced Captcha (free plugin by Pash), like so: ui text box("2Captcha Access Key",#accessKey) ui open file("Captcha File",#captchaFile) set(#solveCaptchaAdvancedCaptcha,$plugin function("Advanced Captcha.dll", "$2captcha.com", #accessKey, #captchaFile, "", "Recognize", "", "", 120, ""),"Global") alert(#solveCaptchaAdvancedCaptcha) But if you just want to do it yourself for learning or other reasons then try this: ui text box("2Captcha Access Key",#accessKey) ui open file("Captcha File",#captchaFile) set(#sendCaptcha,$plugin function("HTTP post.dll", "$http upload", "http://2captcha.com/in.php", "key={#accessKey}", #captchaFile, "file", "image/jpeg", "", "", "", ""),"Global") set(#getCaptchaId,$list item($list from text(#sendCaptcha,"|"),1),"Global") comment("Put a loop here to send this get every 5 seconds or so until you get a response") set(#getCaptchaAnswer,$plugin function("HTTP post.dll", "$http get", "http://2captcha.com/res.php?key={#accessKey}&action=get&id={#getCaptchaId}", "", "", "", ""),"Global") You will have to wait for a response I didn't add in a loop but you will see if you try it yourself the first get request after sending the captcha will be too quick and so you will have to read the response and wait until it solves it or it fails or gets an error. 1 Quote Link to post Share on other sites
HaHaItsJake 25 Posted March 17, 2017 Author Report Share Posted March 17, 2017 You can use Advanced Captcha (free plugin by Pash), like so: ui text box("2Captcha Access Key",#accessKey) ui open file("Captcha File",#captchaFile) set(#solveCaptchaAdvancedCaptcha,$plugin function("Advanced Captcha.dll", "$2captcha.com", #accessKey, #captchaFile, "", "Recognize", "", "", 120, ""),"Global") alert(#solveCaptchaAdvancedCaptcha) But if you just want to do it yourself for learning or other reasons then try this: ui text box("2Captcha Access Key",#accessKey) ui open file("Captcha File",#captchaFile) set(#sendCaptcha,$plugin function("HTTP post.dll", "$http upload", "http://2captcha.com/in.php", "key={#accessKey}", #captchaFile, "file", "image/jpeg", "", "", "", ""),"Global") set(#getCaptchaId,$list item($list from text(#sendCaptcha,"|"),1),"Global") comment("Put a loop here to send this get every 5 seconds or so until you get a response") set(#getCaptchaAnswer,$plugin function("HTTP post.dll", "$http get", "http://2captcha.com/res.php?key={#accessKey}&action=get&id={#getCaptchaId}", "", "", "", ""),"Global") You will have to wait for a response I didn't add in a loop but you will see if you try it yourself the first get request after sending the captcha will be too quick and so you will have to read the response and wait until it solves it or it fails or gets an error. Thanks for the insight, I'm doing it manually because the plugin isn't threadable and the queue system slows the bot down massively. I guess I'm the only with this problem it seems like. Just gonna chalk it down to Murphy's Law. haha. Wait until the end of the month to get the Ultimate Captcha plugin.[solved] Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.