Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Trampolining KEYBD_EVENT

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Xoujiro
Advanced Cheater
Reputation: 0

Joined: 20 Mar 2006
Posts: 86

PostPosted: Sun Nov 09, 2008 4:58 am    Post subject: Trampolining KEYBD_EVENT Reply with quote

ok, so...i trampolined over keybd_event for "gunz online", i went in , activated my dll, used my own keybd_event ( different name) but it doesnt work, i mean it doesnt press the key in gunz, im pretty sure its the trampoline's problem cuz when i alt tab and use the keybd_event on notepad while gunz is running, it works, but not in game, do you know whats wrong? is it because of this error?
Quote:
syntax error : identifier 'PTR'


and another thing... if i got an address in CE, its in 4 bytes, value to be freezed at -2500, i can change it freely in ce and its also a static address, but when i put it in my dll, it errors me, ive checked the address, its correct, and i tried changing the types to dword / long / unsigned long, its still errors me... any help?


thanks in advance

whhy cant i post my code -.-
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sun Nov 09, 2008 5:57 am    Post subject: Reply with quote

keybd_event uses SendInput and that's owned in r0 by GameGuard.
Back to top
View user's profile Send private message MSN Messenger
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Sun Nov 09, 2008 6:07 am    Post subject: Reply with quote

what about PostMessage?
Back to top
View user's profile Send private message
Xoujiro
Advanced Cheater
Reputation: 0

Joined: 20 Mar 2006
Posts: 86

PostPosted: Sun Nov 09, 2008 6:32 am    Post subject: Reply with quote

ok, ill try using postmessage instead, what about my second problem :

the address and type is correct, but everytime i change the value in c++, my game crashes, but not if i change the value with CE


EDIT: can i use the threads in the same DLL i used to trampoline? or i must export and import in another DLL
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Sun Nov 09, 2008 8:29 am    Post subject: Reply with quote

i take its a pointer, if so your not writing the value to the pointer, trying to do it straight to the address, which doesnt work


if its a pointer use Address + Offset = -2500;

if not you have to use Write Process Memory

_________________
Back to top
View user's profile Send private message
Xoujiro
Advanced Cheater
Reputation: 0

Joined: 20 Mar 2006
Posts: 86

PostPosted: Sun Nov 09, 2008 8:51 am    Post subject: Reply with quote

Snootae wrote:
i take its a pointer, if so your not writing the value to the pointer, trying to do it straight to the address, which doesnt work


if its a pointer use Address + Offset = -2500;

if not you have to use Write Process Memory


its not a pointer, checked with ce, correct address everytime i load up my game, and i do.. need to bypass WriteProcessMemory right?
Back to top
View user's profile Send private message
ups2000ups
I post too much
Reputation: 0

Joined: 31 Jul 2006
Posts: 2471

PostPosted: Sun Nov 09, 2008 9:47 am    Post subject: Reply with quote

if your trying to change some memory but the memory wont change try to use VirtualProtectEx before you use WriteProcessMemory

if it dosent work your dont something wrong or you need an bypass

_________________
dont complain about my english...
1*1 = 2?
Back to top
View user's profile Send private message
Xoujiro
Advanced Cheater
Reputation: 0

Joined: 20 Mar 2006
Posts: 86

PostPosted: Sun Nov 09, 2008 10:19 am    Post subject: Reply with quote

ups2000ups wrote:
if your trying to change some memory but the memory wont change try to use VirtualProtectEx before you use WriteProcessMemory

if it dosent work your dont something wrong or you need an bypass


i dont know whther it changes or not, as soon as i change the value, it error lol, ill try writeprocessmemory, do i need to hook it or something?
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sun Nov 09, 2008 10:22 am    Post subject: Reply with quote

Xoujiro wrote:
ups2000ups wrote:
if your trying to change some memory but the memory wont change try to use VirtualProtectEx before you use WriteProcessMemory

if it dosent work your dont something wrong or you need an bypass


i dont know whther it changes or not, as soon as i change the value, it error lol, ill try writeprocessmemory, do i need to hook it or something?


Do what he said and use VirtualProtectEx on the address and THEN try to write to it.

Code:
 DWORD old;
 void* Addr = &INT->c_int;
 VirtualProtect(Addr, sizeof(DWORD), PAGE_EXECUTE_READWRITE, &old);


Example from random file
Back to top
View user's profile Send private message MSN Messenger
Xoujiro
Advanced Cheater
Reputation: 0

Joined: 20 Mar 2006
Posts: 86

PostPosted: Sun Nov 09, 2008 11:01 am    Post subject: Reply with quote

noz3001 wrote:
Xoujiro wrote:
ups2000ups wrote:
if your trying to change some memory but the memory wont change try to use VirtualProtectEx before you use WriteProcessMemory

if it dosent work your dont something wrong or you need an bypass


i dont know whther it changes or not, as soon as i change the value, it error lol, ill try writeprocessmemory, do i need to hook it or something?


Do what he said and use VirtualProtectEx on the address and THEN try to write to it.

Code:
 DWORD old;
 void* Addr = &INT->c_int;
 VirtualProtect(Addr, sizeof(DWORD), PAGE_EXECUTE_READWRITE, &old);


Example from random file


oh wow thanks it works now! thanks alot guys.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites