Skip to content

Instantly share code, notes, and snippets.

@spnow
Forked from evernick/timeGetTime.cpp
Created August 1, 2017 23:10
Show Gist options
  • Save spnow/9c8a508b1a57006104dc706dceb1bc4e to your computer and use it in GitHub Desktop.
Save spnow/9c8a508b1a57006104dc706dceb1bc4e to your computer and use it in GitHub Desktop.
#include <windows.h>
#include <stdio.h>
#pragma comment(lib, "winmm.lib")
BOOL anti_debug(DWORD time1)
{
DWORD time2;
time2 = timeGetTime();
if ((time2-time1) > 0x10) {
return 1;
}
return 0;
}
int main(int argc, char **argv)
{
DWORD time1;
time1 = timeGetTime();
if(anti_debug(time1))
printf("Debugger Detected\n");
else
printf("No Debugger...\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment