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 


[HELP] Sending Keys to Process and how to get Pixels
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
vegito616
Expert Cheater
Reputation: 0

Joined: 08 Jan 2006
Posts: 109

PostPosted: Sat May 05, 2007 4:06 am    Post subject: Reply with quote

Ok, so everything went well, but I have one problem now, Wherever I set the coordinates for getPixel, it returns the same value. Is there a reason for this? My Key-sending is working perfectly but the getPixel is not. Would this happen if Hackshield were to hook getPixel? Is there a work-around if this were the case?
Back to top
View user's profile Send private message
the_undead
Expert Cheater
Reputation: 1

Joined: 12 Nov 2006
Posts: 235
Location: Johannesburg, South Africa

PostPosted: Sat May 05, 2007 4:10 am    Post subject: Reply with quote

I am not psychic. Nor is anyone else here, post source and I can help. Then we can see if its a programming error or an idiot error.
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
compactwater
I post too much
Reputation: 8

Joined: 02 Aug 2006
Posts: 3923

PostPosted: Sat May 05, 2007 5:20 am    Post subject: Reply with quote

Make a dummy process named "myGame.exe" and try that, if it works it's the Game's protection.
Back to top
View user's profile Send private message
vegito616
Expert Cheater
Reputation: 0

Joined: 08 Jan 2006
Posts: 109

PostPosted: Sun May 06, 2007 6:08 am    Post subject: Reply with quote

Yep, I think the game is hooking getPixel. I made a dummy .exe and searched for pixels and got a different result. Here is my source code for anyone that can find a fault I made:

Lolz


Last edited by vegito616 on Wed Jul 04, 2007 10:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
the_undead
Expert Cheater
Reputation: 1

Joined: 12 Nov 2006
Posts: 235
Location: Johannesburg, South Africa

PostPosted: Sun May 06, 2007 7:32 am    Post subject: Reply with quote

Actually, if you used msdn you would know that it does not look for the color black.

the colorref value is a dword in the form of 0x00RRGGBB

so change it to look for the color 0x00000000 for black and 0x00FFFFFF for white.

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
vegito616
Expert Cheater
Reputation: 0

Joined: 08 Jan 2006
Posts: 109

PostPosted: Mon May 07, 2007 8:30 am    Post subject: Reply with quote

But what I'm saying is that it returns the same value no matter what I set the coordinates as. Thanks for the heads up on the return value.
Back to top
View user's profile Send private message
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Mon May 07, 2007 3:45 pm    Post subject: Reply with quote

If you're trying this on say MapleStory, it isn't going to work.

If you're trying to see if you're able to code this, then try it without having GG at all yet on your current session.

If it straight out isn't working, you probably have the incorrect HDC.

I haven't gone far into the C languages and I'm not going to show you my code in it because my syntax mistakes may completely rape your outlook, but I'll check this out in a moment.

_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
vegito616
Expert Cheater
Reputation: 0

Joined: 08 Jan 2006
Posts: 109

PostPosted: Mon May 07, 2007 4:00 pm    Post subject: Reply with quote

Uzeil It works on other applications, so that isn't a problem. I think HackShield might be hooking it. How am I to check for getPixel hooking?
Back to top
View user's profile Send private message
opcode0x90
Cheater
Reputation: 0

Joined: 05 Aug 2006
Posts: 27

PostPosted: Mon May 07, 2007 7:58 pm    Post subject: Reply with quote

RkUnhooker
Back to top
View user's profile Send private message
linden
Master Cheater
Reputation: 0

Joined: 10 Mar 2006
Posts: 319

PostPosted: Mon May 07, 2007 11:00 pm    Post subject: Reply with quote

Don't know about recent version of FuckShield, but when I was working with it back then, all the following usermode functions were hooked by an injected DLL named "EGRNAP.DLL". The injection was done using madCodeHook.

*Kernel32.dll
LoadLibraryExW

*USER32.dll
BeginPaint
EnableWindow
GetDC
GetDCEx
GetWindowDC
MoveWindow
SendInput
SendMessageA
SendMessageW
SetCaretPos
SetCursorPos
SetWindowsHookA
SetWindowsHookExA
SetWindowsHookExW
SetWindowsHookW
ShowWindow
keybd_event
mouse_event

*GDI32.dll
BitBlt
GetPixel

So, other than GetPixel, you have to find a way to circumvent GetDC, GetDCEx, or GetWindowDC hooks.
Look at the first few bytes of the function of your interest, if the first byte is 0xE9, or the first 2bytes are 0xFF and 0x25, that function is hooked.
Back to top
View user's profile Send private message
thenewguy
Grandmaster Cheater
Reputation: -1

Joined: 04 Jun 2006
Posts: 972

PostPosted: Fri Jun 15, 2007 8:16 am    Post subject: Reply with quote

Some information I found online as far as alternatives to getpixel. I haven't had a lot of time to review the information but there are some concepts I think are worth looking into

http://www.allegro.cc/manual/api/drawing-primitives/getpixel

http://www.codeguru.com/Cpp/G-M/bitmap/specialeffects/article.php/c1743

http://www.kaffe.org/pipermail/kaffe/2005-July/102824.html

http://public.kitware.com/pipermail/insight-users/2003-February/002511.html

http://www.codeproject.com/bitmap/ColorCursorFromBmp.asp?df=100&forumid=24865&exp=0&select=1587671
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
Goto page Previous  1, 2
Page 2 of 2

 
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