![]() |
|
[C#] recaptcha solving with 2captcha - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] recaptcha solving with 2captcha (/showthread.php?tid=5992643) Pages: Pages
1
2
|
recaptcha solving with 2captcha - int - Jul 24, 2019 Hello, this is a simple class I use in some of my projects. usage: Probably can be improved, but works fine for me (so far). RE: recaptcha solving with 2captcha - riu41776 - Jul 24, 2019 You must wait 120 seconds for it to be solved? Can't you just wait for the blocking io operation (request sent to the server) to be done and get the response? RE: recaptcha solving with 2captcha - int - Jul 24, 2019 (Jul 24, 2019 08:28 AM)riu41776 Wrote: You must wait 120 seconds for it to be solved? Can't you just wait for the blocking io operation (request sent to the server) to be done and get the response? If you mean wait for the downloadstring to finish, that won't work because technically 2captcha is async compared to us (when our request finishes, they haven't solved it). RE: recaptcha solving with 2captcha - riu41776 - Jul 24, 2019 Haven't you heard of regular expressions and string interpolation feature in C# 6.0? (Jul 24, 2019 08:29 AM)int Wrote: If you mean wait for the downloadstring to finish, that won't work because technically 2captcha is async compared to us (when our request finishes, they haven't solved it). Yeah, after looking at the usage second time i understood that the first request is to upload the captcha and then process it. But damn, this is inefficient waiting two minutes lol. This is no use. RE: recaptcha solving with 2captcha - int - Jul 24, 2019 (Jul 24, 2019 08:29 AM)riu41776 Wrote: Haven't you heard of regular expressions and string interpolation feature in C# 6.0? what the fuck does regex or string interpolation have to do with this? and if its inefficient waiting 2 minutes, then write a better way (I'm doing 2 minutes so I don't spam their servers and waste my money) RE: recaptcha solving with 2captcha - riu41776 - Jul 24, 2019 (Jul 24, 2019 08:32 AM)int Wrote: what the fugg does regex or string interpolation have to do with this? You're doing string concatenation which is slow and ugly to the eyes. String interpolation is easy as $"{Variable}SomeString". Regex is to extract information easily... from the input text. RE: recaptcha solving with 2captcha - tweety - Jul 24, 2019 (Jul 24, 2019 08:37 AM)riu41776 Wrote: You're doing string concatenation which is slow and ugly to the eyes. agreed with the string interpolation, disagree with the regex regex is slow. RE: recaptcha solving with 2captcha - vaiperboy - Jul 24, 2019 stuff to improve: -go the OOP way with this to make it "more flexible" -start using string interpolation, much easier to read -its 2k19, go asynchronous -after checking the status code, get the response by split -never ever make that delay hard-coded but rather use a slow poll loop (with a timeout ofc) -for god's sake, dont expect everything to be perfect and at least check the status codes -remove the console.write part -use tasks (for cancellation + tons of other shit) I'll leave the learning part to you. if you're confused with any part lmk RE: recaptcha solving with 2captcha - int - Jul 24, 2019 (Jul 24, 2019 08:37 AM)riu41776 Wrote: You're doing string concatenation which is slow and ugly to the eyes. I would have just called it string.format instead of string interpolation, which I guess is better, but I'm used to string concat (Jul 24, 2019 08:42 AM)vaiperboy Wrote: stuff to improve: - ok - maybe - probably not - should probably check status code - delay is a slow poll loop RN, in my other projects - yeah, in C++ I would have done more error handling and shit - used for debugging - fuck tasks RE: recaptcha solving with 2captcha - riu41776 - Jul 24, 2019 (Jul 24, 2019 08:39 AM)tweety Wrote: agreed with the string interpolation, disagree with the regex Regex is "slow" on huge inputs, but i still don't agree with it being slow. We're in 2019, hardware are getting better so your opinion would be true years ago. RE: recaptcha solving with 2captcha - int - Jul 24, 2019 (Jul 24, 2019 08:44 AM)riu41776 Wrote: Regex is "slow" on huge inputs, but i still don't agree with it being slow. regex is for fucking idiots fuck regex RE: recaptcha solving with 2captcha - riu41776 - Jul 24, 2019 Most of the "coders" i see here are amateurs not applying OOP techniques like SOLID principles and programming against interfaces instead of implementations. RE: recaptcha solving with 2captcha - vaiperboy - Jul 24, 2019 (Jul 24, 2019 08:42 AM)int Wrote: I would have just called it string.format instead of string interpolation, which I guess is better, but I'm used to string concatand why is that? tasks are perfect for your job you can cancel one whenever you like RE: recaptcha solving with 2captcha - int - Jul 24, 2019 (Jul 24, 2019 08:47 AM)vaiperboy Wrote: and why is that? tasks are perfect for your job tasks are retarded as fuck, last I tried it was either in java for some android garbage or discord bots didn't like the format RE: recaptcha solving with 2captcha - vaiperboy - Jul 24, 2019 (Jul 24, 2019 08:51 AM)int Wrote: tasks are retarded as fugg, last I tried it was either in java for some android garbage or discord botsmate, whats the issue? Code public static Task<string> send_captcha(CancellationToken cancel) {Code await send_captcha(CancellationToken.None); // <<< This will return string |