All pastes #431385 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-09 16:50 UTC
rendered paste body
// under main
	if (AntiSandBox())
		return 0;
// 

BOOL AntiSandBox()
{
	char *users[] = {"sandbox", "honey", "vmware", "currentuser", "nepenthes"};
	DWORD size = 128;
	char szUser[128];
	int i;

	GetUserName(szUser, &size);
	CharLower(szUser);

	for (i = 0; i <	(sizeof(users) / sizeof(LPTSTR)); i++)
	{
		if (strstr(szUser, users[i]) != 0)
			 return TRUE;
	}

	return FALSE;
}