| | |
C++ IsDebuggerPresent Help?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2009
Posts: 19
Reputation:
Solved Threads: 0
Hi, I am creating a crackme (or possibly keygenme, if i feel like it) that realys on a IsDebuggerPresent call to see if the user has olly or another debugger open analyzing it. My current code reads as follows:
I am getting this error:
Why is IsDebuggerPresent always returning true?
Also, for those wondering, the date is there to make sure they dont just patch the program to just JMP to the main code.
C++ Syntax (Toggle Plain Text)
#include <windows.h> #include <stdio.h> #include <iostream> #include <ctime> using namespace std; void debuggerPresent() { SYSTEMTIME st, lt; GetSystemTime(&st); GetLocalTime(<); cout << "Application error or Debugger Present!!!" << endl; return; } void noDebug(int mode){ SYSTEMTIME st, lt; GetSystemTime(&st); GetLocalTime(<); if(mode = st.wMonth) { //Do the main username/password thing here.... } else { debuggerPresent(); } return; } int main() { BOOL WINAPI IsDebuggerPresent(void); SYSTEMTIME st, lt; GetSystemTime(&st); GetLocalTime(<); int day = st.wMonth; if(!IsDebuggerPresent) { noDebug(day); return 0; } if(IsDebuggerPresent) { debuggerPresent(); system("pause"); return 0; } return 0; }
I am getting this error:
C++ Syntax (Toggle Plain Text)
41 C:\Dev-Cpp\files\crackMes\debuggerPresent\ver1.cpp [Warning] the address of `BOOL IsDebuggerPresent()', will always evaluate as `true' 45 C:\Dev-Cpp\files\crackMes\debuggerPresent\ver1.cpp [Warning] the address of `BOOL IsDebuggerPresent()', will always evaluate as `true'
Why is IsDebuggerPresent always returning true?
Also, for those wondering, the date is there to make sure they dont just patch the program to just JMP to the main code.
![]() |
Similar Threads
Other Threads in the C++ Forum
- Previous Thread: Error With Circularly Linked List
- Next Thread: Help : little tough problem
| Thread Tools | Search this Thread |
Tag cloud for c++, error
1 3d activex add api application array arrays assignment binary bitmap blue c# c++ calculator char char* class client code compile compiler component computer console crashcourse development dialog download email embed encryption error evc file fstream function functions game gmail graph guess gui hash html input int java jni lines linker math microsoft multidimensional multiple mysql newbie node number objects output parse php prime problem professor program programming python question read recursion recursive regqueryvalueex return rms rpg savefile screen search server store string strings struct syntax system template templates test text toolbar transform tree university url vista visual win32 windows






