| View previous topic :: View next topic |
| Author |
Message |
Shepherd Expert Cheater
Reputation: 0
Joined: 28 Sep 2007 Posts: 186
|
Posted: Sat Dec 27, 2008 10:10 am Post subject: [Help] HookHop.dll in .NET (VB08). |
|
|
First of all, im learning VB atm.. dont expect me to be pro or something.
Now I want to create a maplestory bot in VB08. Though I do know that postmessage is patched and I know its possible to create a bot trough hookhop.dll. I dont know how to to this, a good googling result gave me a tutorial made by Holland ( http://screwajax88.org/viewtopic.php?f=95&t=2479 ) but thats a tutorial made for VB6 which is completely different then VB08..
So if anyone of you could give me some tips/advice/tutorials on how to do this, that would be awesome.
I want to do this in VB because my parents bought a book for me about VB, so please, dont say I need to learn another programming language..
Thanks.
|
|
| Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
Posted: Sat Dec 27, 2008 11:13 am Post subject: |
|
|
You don't even need HookHop.dll.
You just need an inline asm function that starts the PostMessage function and then jumps 5 bytes into the function with the right parameters.
For the first parameter you need put the handle for MapleStory's window (you can get the handle using the function FindWindow).
For the second parameter you need to decide what type of message this will be (examples are: WM_KEYDOWN, WM_KEYUP, and WM_CHAR).
For the third and fourth parameters you need to put the details of the message you are going to send.
Example Console Application C++ code (MapleStory auto loot):
| Code: | #include <iostream>
#include <windows.h>
using namespace std;
DWORD _PMA = (DWORD)GetProcAddress(LoadLibrary("user32.dll"), "PostMessageA") + 5;
int Loop_Number = 1;
__declspec(naked) BOOL WINAPI _PostMessageA(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
__asm
{
push ebp
mov ebp, esp
jmp dword ptr ds:[_PMA]
}
return 0;
}
int main()
{
for(;;Sleep(10))
{
HANDLE hWindow = FindWindow("MapleStoryClass", 0);
if (hWindow != NULL)
{
_PostMessageA(hWindow, WM_KEYDOWN, 0x5A, (MapVirtualKey(0x5A, 0) << 16)); // Presses Z
cout << "The Z key was pressed. Loop #" << Loop_Number << endl;
Loop_Number = Loop_Number + 1;
}
}
}
|
I'm sorry I can't give you Visual Basic example code.
I really think you should code in C++ but it is completely your choice.
|
|
| Back to top |
|
 |
Shepherd Expert Cheater
Reputation: 0
Joined: 28 Sep 2007 Posts: 186
|
Posted: Sat Dec 27, 2008 11:18 am Post subject: |
|
|
| inoobzx wrote: | You don't even need HookHop.dll.
You just need an inline asm function that starts the PostMessage function and then jumps 5 bytes into the function with the right parameters.
For the first parameter you need put the handle for MapleStory's window (you can get the handle using the function FindWindow).
For the second parameter you need to decide what type of message this will be (examples are: WM_KEYDOWN, WM_KEYUP, and WM_CHAR).
For the third and fourth parameters you need to put the details of the message you are going to send.
Example Console Application C++ code (MapleStory auto loot):
I'm sorry I can't give you Visual Basic example code.
I really think you should code in C++ but it is completely your choice. | Oh I tought MapleStory patched that =/
Thanks anyway, il try it.
|
|
| Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
Posted: Sat Dec 27, 2008 11:22 am Post subject: |
|
|
| To0k wrote: | | inoobzx wrote: | You don't even need HookHop.dll.
You just need an inline asm function that starts the PostMessage function and then jumps 5 bytes into the function with the right parameters.
For the first parameter you need put the handle for MapleStory's window (you can get the handle using the function FindWindow).
For the second parameter you need to decide what type of message this will be (examples are: WM_KEYDOWN, WM_KEYUP, and WM_CHAR).
For the third and fourth parameters you need to put the details of the message you are going to send.
Example Console Application C++ code (MapleStory auto loot):
I'm sorry I can't give you Visual Basic example code.
I really think you should code in C++ but it is completely your choice. | Oh I tought MapleStory patched that =/
Thanks anyway, il try it. |
PostMessageA is patched but hook hopping is a bypass.
Hook hopping means you are jumping the first 5 bytes of the function because a hook was put there (the reason there are conveniently 5 bytes there perfect for a jmp hook was because Microsoft wanted to allow hot patching) but you are still starting the function basically the same (without the mov edi, edi because it is not needed).
|
|
| Back to top |
|
 |
Shepherd Expert Cheater
Reputation: 0
Joined: 28 Sep 2007 Posts: 186
|
Posted: Sat Dec 27, 2008 11:40 am Post subject: |
|
|
| inoobzx wrote: | | To0k wrote: | | inoobzx wrote: | You don't even need HookHop.dll.
You just need an inline asm function that starts the PostMessage function and then jumps 5 bytes into the function with the right parameters.
For the first parameter you need put the handle for MapleStory's window (you can get the handle using the function FindWindow).
For the second parameter you need to decide what type of message this will be (examples are: WM_KEYDOWN, WM_KEYUP, and WM_CHAR).
For the third and fourth parameters you need to put the details of the message you are going to send.
Example Console Application C++ code (MapleStory auto loot):
I'm sorry I can't give you Visual Basic example code.
I really think you should code in C++ but it is completely your choice. | Oh I tought MapleStory patched that =/
Thanks anyway, il try it. |
PostMessageA is patched but hook hopping is a bypass.
Hook hopping means you are jumping the first 5 bytes of the function because a hook was put there (the reason there are conveniently 5 bytes there perfect for a jmp hook was because Microsoft wanted to allow hot patching) but you are still starting the function basically the same (without the mov edi, edi because it is not needed). | I see, thanks for explaining.
Btw can someone also explain how to do it with a hookhop.dll?
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Sat Dec 27, 2008 11:55 am Post subject: |
|
|
you just import the dll and then call hhPostMessage()
_________________
|
|
| Back to top |
|
 |
|