View previous topic :: View next topic |
Author |
Message |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Sat Jan 08, 2011 11:35 pm Post subject: Attach a debugger |
|
|
I want to add a debugger to my memory scanner before I release it to the public, so far the good features it has is:
- Super fast scans (really close to CE's scans)
- HEX View
- Pointer Scanner (Faster then CE's and MHS, i'll provide a video later to prove it)
I want to add a debugger to find inline asm code but I don't know where to start, can any of you guys provide a link or comment something that can help me out?
Thank you
EDIT
so far this is what I have (attaching a debugger):
Code: |
#include <windows.h>
#include <iostream>
using namespace std;
void main ()
{
system ( "TITLE Debugger" );
system ( "COLOR 3" );
DWORD ProcessID;
HANDLE hToken;
TOKEN_PRIVILEGES tkp;
if ( OpenProcessToken ( GetCurrentProcess (), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken ) )
{
LookupPrivilegeValue ( NULL, SE_DEBUG_NAME, &tkp.Privileges [0].Luid );
tkp.PrivilegeCount = 1;
tkp.Privileges [0].Attributes = SE_PRIVILEGE_ENABLED;
AdjustTokenPrivileges ( hToken, false, &tkp, sizeof (tkp), NULL, NULL );
}
HWND hWnd = FindWindowA ( NULL, "Cheat Engine Tutorial v3" );
GetWindowThreadProcessId ( hWnd, &ProcessID );
if ( DebugActiveProcess ( ProcessID ) )
{
cout << "Attached the debugger to the target" << endl << endl;
DEBUG_EVENT dbg;
WaitForDebugEvent ( &dbg, 100 );
cout << "Process ID: " << dbg.dwProcessId << endl;
cout << "Thread ID: " << dbg.dwThreadId << endl << endl;
ContinueDebugEvent ( dbg.dwProcessId, dbg.dwThreadId, DBG_CONTINUE );
}
else
{
cout << "failed to debug" << endl;
}
DebugActiveProcessStop ( ProcessID );
cin.get ();
}
|
excuse my void main, i did it because of a rush.
|
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sun Jan 09, 2011 12:41 am Post subject: |
|
|
was it really that hard to type 7 more characters
|
|
Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Sun Jan 09, 2011 12:45 am Post subject: |
|
|
I just realized i'd have to find the bytes of each address and convert them to inline asm, these api's are useless.
|
|
Back to top |
|
 |
NoMercy Master Cheater
Reputation: 1
Joined: 09 Feb 2009 Posts: 289
|
Posted: Sun Jan 09, 2011 3:31 am Post subject: |
|
|
Is a debugger not based on BreakPoints?
|
|
Back to top |
|
 |
zile Advanced Cheater
Reputation: 0
Joined: 11 Jul 2009 Posts: 75
|
Posted: Sun Jan 09, 2011 4:14 am Post subject: |
|
|
are you sure your pointer scanner is faster than ce's , cause ce is so damn fast and it scans for many pointer levels as well, does your pointer scanner has pointer level option?
and i think darkbyte gave a few advice regarding what you are doing before
|
|
Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Sun Jan 09, 2011 1:31 pm Post subject: |
|
|
@zile I will show a video of my pointer-scanner, however, it only scans for level 1 pointers
@NoMercy I think so, we set a breakpoint to find what out accesses / writes to the address when it reaches the address.
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Jan 09, 2011 2:21 pm Post subject: |
|
|
You aren't using the debugging API correctly as it is, there is no loop to handle each exception, there's no checks if things fail etc. Rather then keep rushing into everything you do and not understand it, why not go read up on the debugging API and learn the flow of how they work.
_________________
- Retired. |
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
|
Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Sun Jan 09, 2011 7:12 pm Post subject: |
|
|
iPromise wrote: | I just realized i'd have to find the bytes of each address and convert them to inline asm, these api's are useless. |
Maybe today is the day you learn that real software just isn't a wrapper around an API, and that there is actual work involved.
Probably not though.
|
|
Back to top |
|
 |
|