Self delete program

Ok this one is for my friend tweekier. There are many ways to do this just choose one. Surprisingly I ‘ve seen one in Megapanzer that is quite simple, not sophisticated, I don’t like it at all for coding anywayz here it is.

void deleteYourself()
  char lCommand[MAX_BUF_SIZE + 1];
  char lFile[MAX_BUF_SIZE + 1];

  ZeroMemory(lCommand, sizeof(lCommand));

  if((GetModuleFileName(0, lFile, sizeof(lFile)) != 0) && (GetShortPathName(lFile, lFile, MAX_BUF_SIZE) != 0))
    _snprintf(lCommand, sizeof(lCommand) - 1, "/c del %s >> NUL", lFile);
    GetEnvironmentVariable("ComSpec", lFile, MAX_PATH) && ShellExecute(0, 0, lFile, lCommand, 0, SW_HIDE);
  }// else

If you want to look for more neat, complex and l33t ways to do this go here

If you are nuts enough please check this one too


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: