/*
	+ procmask.c +
	Simple máscara de procesos
	A simple process' masquerade
	
	It didn't works on FreeBSD
	No funciona en FreeBSD

	   Author: despai
	   	   skkunk@gmail.com
	   	   www.despai.es
	   		  
	Necesitas adaptar éste código al proceso que
	quieras disimular
	
	You need to adapt the code to the process' code
	u need to disguise
	
	PD: Just for fun o:)
		 28/02/2008
*/

#include <stdio.h>
#include <string.h>
#define MASCARA "bash"

main(int argc, char **argv)
{
	int short cuenta;
	int short tam;
	char argumentos[15][30];
	
	strncpy(argumentos[0],argv[0],30);
	if(argc >= 2) {
		for(cuenta=1; cuenta<=argc-1; cuenta++)
			strncpy(argumentos[cuenta], argv[cuenta],30);
   
      		for(cuenta=1; cuenta<=argc-1; cuenta++)
			bzero(argv[cuenta],strlen(argv[cuenta]));
	}
	bzero(argv[0],strlen(argv[0]));
	strncpy(argv[0], MASCARA, 30);

	printf("\nType 'ps u' to check it works\n");
	while(1);
}
