Captcha with the fishing bot
Me, Matt and a few guys from other sites were going to make a clientless fishing bot. I know Matt had been unable to figure out the captcha, and I had barely started. I've been procrastinating all afternoon on an essay I have due tomorrow, and I did some work on the fishing bot.
I was going to code it all in Python. I remembered that Terry had already done a lot of the work previously, so I scoured Google for a copy of his old program "A Fishermans Friend". Unfortunately the copy I found was only partially complete, and a lot of the completed code was incompatible with the current setup, however I've been working on it all afternoon and have recoded a lot of it so that it now works, at least roughly. It's successfully able to save the fish to your inventory. The copy I have is still far from being ready for a public release, however I thought I would share how to handle the captcha.
Matt had already alluded partially to the process. And really, the process is very simple, so I don't see how you have had a problem with it
izzy:. When you're ready to save, the first step is to request the captcha from the following URL:
The only variable that should change in that address is the X var, which is the current time. Leave everything else alone. You should receive a return somewhere along the lines of the following:
Which is this image:

In case you can't read those characters after the 3009, its chr(1) + chr(5) + chr(1). So split by that and you'll have the URL to the captcha image. Simply use that URL to load the captcha, and save the result in a string somewhere. Now, here's the thing that originally confused me. Most of these applications require you to pass through the challenge and the captcha text. i.e., from the above example:
Challenge (the identifier in the URL):
Captcha text:
However, Gaiaonline remembers the challenge serverside (likely as a session). So all you have to do is send back the captcha text as part of the final send request. That's why it's impossible to bypass the captcha (and everyone who claims they can is full of shit). If you don't pass back captcha text, or don't request a captcha, etc. the server will simply detect it and not accept it.
Now, the ActionScript function to save the game is as follows:
It's the final 10 or so lines you should focus on at first. _loc6 is the array of values to send through with the request. You should be familiar with the setup, as each request to their sushi server is in the same format. So, going through them:
So, provided you request the captcha and then send through the valid text, the bucket should save! Let me know if you have any questions.
I was going to code it all in Python. I remembered that Terry had already done a lot of the work previously, so I scoured Google for a copy of his old program "A Fishermans Friend". Unfortunately the copy I found was only partially complete, and a lot of the completed code was incompatible with the current setup, however I've been working on it all afternoon and have recoded a lot of it so that it now works, at least roughly. It's successfully able to save the fish to your inventory. The copy I have is still far from being ready for a public release, however I thought I would share how to handle the captcha.
Matt had already alluded partially to the process. And really, the process is very simple, so I don't see how you have had a problem with it
izzy:. When you're ready to save, the first step is to request the captcha from the following URL:http://www.gaiaonline.com/chat/gsi/index.php?X=1307010135076.65&v=sushi&m=3009%01fishing%0193e5f8c7e4e3d0d22a695c2ec1a6bff0ca3ab67fc96446eaThe only variable that should change in that address is the X var, which is the current time. Leave everything else alone. You should receive a return somewhere along the lines of the following:
3009http://api.recaptcha.net/image?c=03AHJ_VusAze7AzZpYaeyp7eKW85xcBJ2nR3Ip3McCeVD4ccV_cRaMRmDdc2wwoXiBKNRls9Yq56-mJuVe7dYAkq4sGSvOLTHbYQ8-HegWnyd0qoASNij-ig9J2nS_ocWb4Xn9_FKEsS1Fx4puAk1HydOHf1dNRa6ThQWhich is this image:

In case you can't read those characters after the 3009, its chr(1) + chr(5) + chr(1). So split by that and you'll have the URL to the captcha image. Simply use that URL to load the captcha, and save the result in a string somewhere. Now, here's the thing that originally confused me. Most of these applications require you to pass through the challenge and the captcha text. i.e., from the above example:
Challenge (the identifier in the URL):
03AHJ_VusAze7AzZpYaeyp7eKW85xcBJ2nR3Ip3McCeVD4ccV_cRaMRmDdc2wwoXiBKNRls9Yq56-mJuVe7dYAkq4sGSvOLTHbYQ8-HegWnyd0qoASNij-ig9J2nS_ocWb4Xn9_FKEsS1Fx4puAk1HydOHf1dNRa6ThQCaptcha text:
alimer sciousHowever, Gaiaonline remembers the challenge serverside (likely as a session). So all you have to do is send back the captcha text as part of the final send request. That's why it's impossible to bypass the captcha (and everyone who claims they can is full of shit). If you don't pass back captcha text, or don't request a captcha, etc. the server will simply detect it and not accept it.
Now, the ActionScript function to save the game is as follows:
function savingGame() {
if (_root.playAsGuest) {
_root.main.continueGame();
return (undefined);
}
var _loc3 = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var _loc8 = "";
var _loc9 = new Object();
var _loc5 = "";
var _loc7 = "|";
if (_root.whichLake == "bassken") {
_loc9.pondMap = 0;
var _loc4 = new Array(100005, 100004, 100006, 100007, 100008, 100021, 100020, 100019, 100028, 100029, 100022, 100023, 100034, 100035, 100040, 1000523, 1000463, 1000465, 1000467, 1000469, 1000471, 1000473, 1000503, 1000501, 1000499);
}
else if (_root.whichLake == "gambino") {
_loc9.pondMap = 1;
_loc4 = new Array(100009, 100010, 100011, 100012, 100013, 100021, 100020, 100019, 100031, 100030, 100024, 100025, 100036, 100037, 100041, 1000523, 1000475, 1000477, 1000479, 1000521, 1000519, 1000517, 1000515, 1000513, 1000511);
}
else if (_root.whichLake == "durem") {
_loc9.pondMap = 2;
_loc4 = new Array(100014, 100015, 100016, 100017, 100018, 100021, 100020, 100019, 100033, 100032, 100026, 100027, 100038, 100039, 100042, 1000523, 1000481, 1000483, 1000485, 1000509, 1000507, 1000505, 1000493, 1000495, 1000497);
}
if (_root.main.myFish.length > 0) {
for (var _loc2 = 0; _loc2 < _root.main.myFish.length; ++_loc2) {
++_loc3[_root.main.myFish[_loc2]];
}
for (var _loc2 = 0; _loc2 < _loc3.length; ++_loc2) {
if (_loc3[_loc2] > 0) {
_loc8 = _loc8 + (_loc4[_loc2] + "" + _loc3[_loc2]);
_loc5 = _loc5 + (_loc4[_loc2] + ":" + _loc3[_loc2] + _loc7);
}
}
}
else {
_loc5 = _loc5 + _loc7;
}
var _loc11 = _root.main.fishData.sid2 + _root.gsiUserData.gaia_id + _root.main.fishData.sid3;
var _loc10 = _loc8 + _root.main.fishData.sid3;
var _loc6 = new Array();
_loc6[0] = "510";
_loc6[1] = _loc9.pondMap;
_loc6[2] = _loc5;
_loc6[3] = calcMD5(_loc11);
_loc6[4] = calcMD5(_loc10);
_loc6[5] = _root.gsiUserData.gaiaSID;
_loc6[6] = _root.captcha_panel.passcode;
sushi.callPlugin("G_FISH_PLUGIN", _loc6, savingGame_CB, _root);
}[/6][/5][/4][/3][/2][/1][/0]It's the final 10 or so lines you should focus on at first. _loc6 is the array of values to send through with the request. You should be familiar with the setup, as each request to their sushi server is in the same format. So, going through them:
0 - the method number to invoke. 510 is saving the game.
1 - which pond you're in. 0 = bassken 1 = gambino 2 = durem
2 - ids of fish and how many. i.e. 100015:2|100016:3|100017:3|100026:1|100027:2|100038:2|100039:5| (see how its calculated above)
3 - see how it's calculated above
4 - see how it's calculated above
5 - Gaiaonline session id
6 - the captcha text (in this case alimer scious)So, provided you request the captcha and then send through the valid text, the bucket should save! Let me know if you have any questions.
9 AM ----------
rk on this project a lot during my 6 weeks off (starting next friday). Do you think you'll have time? If not, I'll probably just configure the spider myself.