Skip to content

Instantly share code, notes, and snippets.

@evernick
Created June 18, 2015 09:06
Show Gist options
  • Save evernick/17633c553ad0b12df844 to your computer and use it in GitHub Desktop.
Save evernick/17633c553ad0b12df844 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