PhilVegasOne
Newbie
- Nov 28, 2012
- 48
- 6
I'm looking to meet people who have actually done a complex bot, something to play a game or work an interface via windows. If you have done this successfully or unsuccessfully, please PM me.
Years ago I wrote bots for games like World of Warcraft, none of that AutoIT stuff .. but proper injected and complex bots
Typically you create them in two parts .. the first part is a tiny C++ DLL that is injected to the running process (e.g. the game) via the CreateRemoteThread() API call. Once the DLL is loaded within the target process you start a "remote control" thread where it sits and listens for instructions over a pipe, socket or shared memory segment. This technique allows you to do very sophisticated things like making direct calls on the game/program objects, or hooking functions to filter through your code before being passed to the original function.
The second part can be written in (almost) anything you like, generally I use C# .. you just connect to the DLL via whatever IPC method you've chosen and send it instructions/commands. In some cases programmes with poor anti-cheat mechanisms can just be memory-edited directly to influence the control-flow of the game/software. C# is also great to run your state-machines or simplistic AI-like features like Behaviour Trees, I was using a sophisticated navigation system to route around enemies and obstacles.
Now I'm using similar techniques in internet-marketing .. creating simple AI-like features for bots that simulate "real" users on social networks. What are you planning?
For Dll injection, don't you need to know/understand the code of the original process running to make any function calls?
Exactly, you'd need to reverse-engineer the parts you want to interfere with and then you can make vtable calls on the C++ objects that are part of the original program. Basically your code will have a "dummy" header file describing the objects you've reversed, you pointer-deref to that object in the main programme and you can call those functions just like any other C++ object.
oh boy, a poker bot. I remember those days and the massive headaches associated
Your problem is not simple.
There are 2 separate phases in creating an intelligent bot:
a) Interface with the heart of the system
This can be done through API or manipulating the navigator (or sometimes manipulating a compiled component such as an activeX).
I doubt a poker game would provide an API...
IMHO this part is the most complex because html interfaces are a total anarchy. Interfacing with a compiled component is even worse. Some interfaces are easy to manipulate, some others are a nightmare. Chances are the visitor interface changes all the time. In some other cases, the developpers have programmed antibot protections (I encountered this case while scraping proxies: the html was scrambled with extra code preventing it to be easily copied). You may also need to develop 'human simulation' to be able to play (for example: delay some commands, have consistent IPs...)
In your example, it means for example that you need to find the values of the cards of the various players, and find a way to ask for cards, place a bet or else
In your example, it means for example that you need to find the values of the cards of the various players, and find a way to ask for cards, place a bet or else
b) When this has been done, you need to program the logic
For games, it involves statistical calculations and can be very complex: sometimes several months or even several years of work (think chess game programming). In many cases, it requires artificial intelligence.
This part is a lot easier because you control the environment and you can develop whatever programming trick you need.
Most commercial bots I've seen are simply script recorders. I have never been able to use any of them for complex tasks.
It will be hard to find a suitable programmer. Programmers are not trained for these kind of tasks. I have tried with several students or programmers on market places (odesk...) and I have abandonned quickly, even for simple tasks.
In summary: If you have a big budget, you will be able to implement your project. Else, be prepared to suffer while learning.
Poker sites have huge protection against bots... So ive heard.
Are there any in-depth tutorials or websites about creating bots with dll injects?