Skip to content

Instantly share code, notes, and snippets.

@evernick
Created June 18, 2015 09:04
Show Gist options
  • Save evernick/69af614500a78f0ebfcd to your computer and use it in GitHub Desktop.
Save evernick/69af614500a78f0ebfcd to your computer and use it in GitHub Desktop.
#include <windows.h>
#include <stdio.h>
#pragma comment(lib, "winmm.lib")
BOOL anti_debug(DWORD count1)
{
DWORD count2;
count2 = GetTickCount();
if ((count2-count1) > 0x10) {
return 1;
}
return 0;
}
int main(int argc, char **argv)
{
DWORD count1;
count1 = GetTickCount();
if(anti_debug(count1))
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