Choose the dog / cat captcha

12/02/2016 13:49 Boosniffaren#1
Hi guys. I've made a bot that loops a number of times repeating some actions, but what I can't seem to figure out is how I can bypass an "easier than normal" captcha.

The captcha works like this: Every once in a while, an image captcha appears that contains a dog and a cat, to continue earning xp, the character has to choose the correct image of the cat, always. It's always "the cat," and never "the dog" you have to chose, but they are on different sides each side and alternates between left and right, and also has different images of themselves each time.

I've built a database of images built upon this, and so far have about 50 pictures of these captchas appearing, each time a different cat that you have to choose. Is it then possible to make it so the bot chooses the correct image, based on this database, and continues the loop as normal?

This might be complicated, I don't know, I'm fairly new to programming so I would not really know how hard of a task this would be.

Any tips? Let me know if you have any questions. This is the only thing missing from making this bot functional.
12/02/2016 13:54 alpines#2
If the amount of the picture is low then you're probably able to do it as you've just described it.

The problem is that they can have a huge fuck*** amount of pictures representing dogs and cats so you still might have a lower solve rate.

But the way you've explained it sounds reasonable and doable.
Just collect the pictures and store them and each the time the captcha appears just compare the pictures to your database and if it doesn't match, then simply select a random cat/dog.

If the captcha succeds then you can add the picture you've just clicked to your database.
This way you'll start off with a fairly small database (~100pictures) and it will grow by itself over time.
12/02/2016 15:26 Boosniffaren#3
Quote:
Originally Posted by Boosniffaren View Post
Okay, thanks buddy for explaining it to me. I do not know where they get their images from, but I suspect it's not alot of pictures, since i've seen many of them again allready, doing the levels about 300+ times.

Any idea on how I would go on about doing this? I'm a beginner at programming, and started with autoIT this week :P I'll give you an example of where I want this "imagesearch" thing to happen if need be.
To quote myself, here is the link to the current code I want to take imagesearch into consideration aswell.

Local $i = 0
Do
$i = $i + 1
;Click on the first level
MouseClick ("left", 2582, 313)
MouseClick ("left", 3149, 327)
MouseClick ("left", 2587, 737)
MouseClick ("left", 3150, 752)

;Click the play button
MouseClick ("left", 2507, 322)
MouseClick ("left", 3079, 338)
MouseClick ("left", 2506, 745)
MouseClick ("left", 3073, 761)

;Wait for the game to finish
Sleep (138000)

;Return to lobby
MouseClick ("left", 2662, 469)
MouseClick ("left", 3225, 472)
MouseClick ("left", 2666, 866)
MouseClick ("left", 3229, 867)

Until $i = 3

----------------End of loop-------------------------------------------
After the ;Wait for the game to finish line of code, a captcha can randomly
appear, as such I would want to implement some sort of "If" captcha appears then " do this and this". Then, return to lobby as normal.

If there's any better way to paste in code in the future, please do tell me how :)
12/02/2016 16:46 alpines#4
Quote:
Originally Posted by Boosniffaren View Post
If there's any better way to paste in code in the future, please do tell me how :)
You should clean up your code, having so many mouse clicks in a loop looks weird, instead try to stuff them into a function.

It looks way better if you do it like this (well I preferr it this way) and the code is easier maintanable.
Code:
For $i = 1 To 3 
	_Game_ClickOnFirstLevel()
	_Game_ClickOnPlayButton()

	While Not _Game_IsFinished()
		Sleep(100)
	WEnd

	_Game_ReturnToLobby()

	_Game_SolveCaptcha()
Next