| | |
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 |
.so api array arrays based binary bitmap blue bmp business c# c++ char char* class classes code compile compiler console data delete development download email embedded encryption engine error evc exam file floatingpoint fstream function functions game gmail gnu graph gui ide input insert int introduction java javac jni linker linux lnk2019 math maze newbie opengl output partnership pause performance php position practice problem professor program programmer programming python read recursion recursive richedit rpg ruby samples screen send sql sticky store stream string struct studio superclass symbian syntax template text traverse tree undosend url virus vista visual win32 win32api windows






