You want ur external executable to talk to you injected dll?
Ok, so I've looked around for a while but couldn't find anything that solved my problem.
I've made a dll that hooks the send function of a game.
I have also made a program that, when started, injects the dll into the game.
What I would like to do is send packets from within the program that injected the dll after it has been injected. How would I go about doing this?
Thanks
You want ur external executable to talk to you injected dll?
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
yep.
Is that not possible?
If it isn't then how would I be able to send a custom packet?
No that's not the problem.
You should just stop using the word packet is all, its a little confusing. Packets are talked about when sending a message from a server to a client or the other way around, but usually that's is via the internet, not on your own machine.
So lets say you want to control ur .dll via ur executable.... hmmm there's several ways to do it (as always). How about just gaining the ModuleHandle and reading and writing to that process, I've also heard of things such as a mutex, hmmm... there's a better way to do this without just hacking it I think... Hopefully BA will stop in soon, I'd like to see an approach to this as well.
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
I do want to send it from my computer to a server.
Why not explain what you want done. Because capturing and sending your own packets to a game is not that easy most of the time. It also has legal issues greater then normal hacks for you are stealing data from them and altering there game at server level. You will need a program to capture packets to get a better understanding of what is possible to change then you will need to understand how they handle there packets once you send them. That means you will need a good part of the games source code.
Good luck
I basically want to make a simple bot for the game. An example of a function of the bot would be like auto healing. When your hp gets below a certain level, the bot would send the packet for a healing spell.
Lol. Its not a packet man. You just need to in ur .dll find the value that corresponds to your life points. And when it is low, send a command, to use a healing spell, or call the healing spell function directly. by reversing it. I think what you want to do is send the game certain key and mouse presses correct? and ofcourse you want to be able to control this from an outside window that you can use even when the game is minimized. right?
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
How is it not a packet?
And i can't do this from within the dll because all of the logic and options are in the other program. I do not want to simulate mouse presses or keyboard presses.
Here basically what I want to do within my program:
or I likely will want to have a wrapper function that I only need to send in the buffer and no other informationCode://packet to send, this is the actual heal spell packet char healSpellBuffer[]="\x03\x00\x23\x91\x05"; if (hp < somevalue) { //mSend function is within the dll mSend(Socket, healSpellBuffer, 5, 0); }
Why don't you just call the undetoured address of the send method? DetourFunction returns the address of the method which has been detoured, calling via this address will detour the detour(lol, sounds weird..). But if that isn't possible with DetourFunction(And it is), you can write your own DetourMethod. Research of the calling convention and x86 instruction set.
As far as local communication goes. You should NOT be writing to another processes memory. It's better to use a memory-mapped file, and a mutex objects. Where read\write access to the file is only allowed when the mutex object is locked by the thread performing the io operations on the file. This way, you can avoid collision of read during writes. You'll also need to create your own messaging protocol, or use an existing one. I wrote a C++ class a while ago that performed token parseing, which makes processing a file, or string fairly easy. I can post it here if you'd like.
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
why06 (02-09-2010)
Well, I've thought about it and I'm probably going about this the wrong way. So what would you guys say is the easiest way to send a packet to a server?
I've read that creating a proxy is a good solution, but I haven't been able to find a tutorial on how to create a proxy.
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
crushed (02-09-2010)