The @ sign shouldn't get encoded.
"There is no higher form of user validation than having customers support your product with their wallets." ~ Google
toddddd (02-09-2017)
lol figured that might happen. Ill PM you so we stop blowing up this thread, then once we get it figured out you can either post about how or ill just include the fix in the next release
That doesnt actually make any difference ive found. I tried it with and without, both work (and have been working) for me.
edit: ahh i see you fixed it @~V~ nice. Ill include some way to remove possible linebreaks in the next release. My guess is the data being returned might be too big and curl is breaking it into two or something like that. Ill see if theres some way to prevent that in the future. Thanks for helping debug!
edit2: going with what ~V~ posted, might as well check for both \n and \r and also keep the check i added for detecting valid xml or not. This is what i have in my loadConfig function now (starting at curl_get):
Code:std::string rawxml = curl_get("https://realmofthemadgodhrd.appspo*****m/char/list", c->guid, c->password); std::size_t found = rawxml.find("\n"); if (found != std::string::npos) rawxml.erase(std::remove(rawxml.begin(), rawxml.end(), '\n'), rawxml.end()); found = rawxml.find("\r"); if (found != std::string::npos) rawxml.erase(std::remove(rawxml.begin(), rawxml.end(), '\r'), rawxml.end()); IXMLResults xe; ICXMLNode xNode = IXMLDomParser().parseStringNonT(rawxml.c_str(), NULL, &xe); if (xe.errorCode != 0) { // Error parsing the xml printf("XML Parse Error: %s\n", IXMLPullParser::getErrorMessage(xe.errorCode)); return; } // Check if the returned xml is an error if (strcmp(xNode.getName(), "Error") == 0) { printf("Error: %s\n", xNode.getText()); return; }
edit3: do any of you have any experience with the GNU public licenses? I plan to add one to the project before i release on ******. Ive seen a few things released under the Aladdin license, MIT license, and then there are a few different GNU licenses. Ive read through a few of them, and the differences are so minute that it doesnt seem to make any difference which one i pick from what i can tell. So just wondering if you guys have any preference or experience with one that you would recommend it over the others.
Last edited by toddddd; 02-09-2017 at 08:32 PM.
~V~ (02-10-2017)
"There is no higher form of user validation than having customers support your product with their wallets." ~ Google
toddddd (02-10-2017)
Firefox might be trying to urlencode the already urlencoded string, would be my guess. But i havent seen it fail with curl yet in regards to urlencoding the @. One of the reasons i used curl over URLDownloadToFile was because i wanted easy access to a string url encoding function...but yeah im not that happy with curl's function, i would prefer if it didnt encode the @ sign too. But meh.
I appreciate the input! I was looking at that one or possibly aladdin, ill do some more research today and hopefully put this on ****** at some point later on, thanks!
Kushala Daora (02-10-2017)
Okay guys, project is up on ******. Since ****** links arent allowed here, you can find my ****** by googling "****** toddw123", then go to my repos and its the newest repo "RotMG_Clientless".
It has almost all of the inbound packet classes done. Still missing a large amount of outbound packets. Hopefully ill get the rest added tomorrow or sunday.
The code that is up on ****** has the new "Client" class. It doesnt have much right now, but i do plan to move the socket handling to the Client class eventually. That way you would technically be able to run as many bots as you want all from 1 exe.
Lots of other various changes since the last code posted. One thing im not sure if it works or not is the File Packet. Im not sure what triggers the server to send it, but im not sure if the way i have it reading will actually work or not. So if anyone knows how to trigger that and wants to test it, let me know (it should create a file with the correct filename if it does get the FilePacket, but it could just crash).
If you compile the code as is right now and put in your account details, you will see the bot do exactly what i posted a gif of last (going into the left Cloth Bazaar). Its just to test the reconnect code and make sure it worked, as well as to test the movement math.
Ummm...lets see....Oh so checking the program's cpu and mem usage with taskmanager is still showing about %0.1-%0.2 cpu usage and memory holds around 1.8-1.9MB for me. That makes me really happy sofar, means no memory leaks (yet) haha. The program does have an initial spike where it jumps to like %0.6 cpu (lol) but then drops down. Sofar im extremely happy with the progress.
Packet classes im trying to keep those as close to the client's name/structure as possible, that is why some of the variables in packets differ from the variable names in k-realy and such.
Not sure what else to post about this, but hopefully you guys can find the ****** repo easily and if you guys have any questions let me know. This thread will be an update log/debug discussion basically, i might occasionally post the project source here as well for those that dont want to find it on ******. Thats all i can think of right now.
edit: oh and the settings.xml file is ignored so you have to create it, there is a settings-sample.xml file incase someone doesnt know the layout of settings.xml. Let me know if you guys run into any errors or anything.
Last edited by toddddd; 02-10-2017 at 11:18 PM.
New
Current Project:
SimpleExaltHack
Outdated stuff I made in the past:
Famebot
Clientless tradebot
RotMG ping checker
Zautonexus crack
I want to post a small update on here for anyone who isnt following the ****** progress. Things have been going great on this, been getting lots of help from others contributing (which is awesome) and whatnot. Most of the packet classes are finished at this point. About to start moving on to the game data and figure out the best way to parse/store/track various things. I did just push an update that converted the whole project from a single client/account program into a multiple client/account program.
I havent tested more then 2 accounts at once, but it should be able to handle as many as its given. The settings.xml file is laid out in a way that you just create a new <Client> block with the account details, and when you start the program up it will login to all the valid accounts provided. Of course if you only want it to use 1 account you can always just put 1 account in the settings file. Still dont have too many plans for what this will be yet, one idea ive had is to create a base project that others can then fork and build ontop of into whatever they want. At its current state it could easily be turned into a spam bot, trade bot, nexus item bot, notification bot, and other basic things like that. It would just take some time in programming out the logic of those various tasks.
Anyways, heres a couple images showing the multiple client status in action:
It isnt much to see, but its basically showing that both of the clients are running and respond to commands. The second image is just the general debug output from the program, and below that you can see the usage of the program with 2 clients running. Now that there are 2 clients, and a lot more stuff added, the usages spiked up to about 6% near the start (from the curl request and/or the initial update packets being received by both clients), then it sits around 0.3-1.5% depending on whats going on around it. I havent tested if the usages scales with the number of clients or not, thats something ill probably check into soo.
So if you interested in this at all, especially if you want to contribute, go check out the ******. Just google "****** toddw123" and the 3rd link should be my profile, and in there you can find the repo RotMG_Clientless.
bluuman (02-21-2017)
I see you were posting in the clientless tradebot thread about this sort of thing and you werent too sure why a clientless program wouldnt need to "listen" on a port (ie, bind to a port). The answer is pretty simple and ill lay it out in a simple of terms as i can to help you visualize/understand what is going on here:
A proxy is doing 2 things. First, its mimicking the server by binding to a port and waiting for inbound connections (from a client). Second, its mimicking the client by making its own outbound connection to the real server and then its simply passing the data from the real client to the real server (which gives it access to the packets).
A clientless bot is not a proxy, the idea is to cut out the proxy and just mimic the client. This means that the program doesnt need to listen for any inbound connections (which requires binding to a port), it is receiving and sending the data directly to the server.
Think of it this way, you can open 10 game clients and each of them will work, right? You wouldnt get an "error socket in use" message on any of them because all of them are making outbound connections, none of them require binding to a port. Well, thats exactly how a clientless bot works, it mimics the client.
So to get back to the program im building, the way its able to handle multiple accounts at once is by putting the outbound connection handling into its own class and then make as many threads of that class as i want. Each thread acts as if it was the client. No need to bind to any ports, just all making outbound connections.
bluuman (02-21-2017)
Thanks for the explanation! Is there any functional difference between a client that connects to the proxy and a client who sends his own packets to the server? Would you be able to manipulate incoming packets differently with a proxy, or could hooking on to and changing packets work just the same in a client without a proxy to the server? My curiosity stems from the fact that many rotmg were coded for k-relay or a similar proxy, and not just in the client using actionscript or something similar. Maybe this is on account of the fact that the client was obfuscated before.