void shellcode();

int print_shellcode(char *shellcode,int maxlen){
int i=0;
int j=0;
printf("char shellcode[]=\n");
printf("\"");
while(shellcode[i]){
	if((j%maxlen==0) && (j!=0))
		printf("\"\n\"");
/*	if(((shellcode[i]>='a')&&(shellcode[i]<='z'))
	&& (( (shellcode[i+1]>='a') &&(shellcode[i+1]<='z') )  || (shellcode[i+1]==0) ))
	
	
		{
		if ((shellcode[i-1]<'a')||(shellcode[i-1]>'z'))
			{
			j=0;
			printf("\"\n\"");
			}
		printf("%c",shellcode[i]);
		goto end;
		}
	if(shellcode[i]=='/')
		{
		printf("/");
		goto end;
		}
*/	printf("\\x%.2x",(shellcode[i]&0xff));
	end:
	i++;
	j++;
	}
printf("\" ;\n");
	}
	
			

int main(int argc,char **argv){
int maxlen=10;
if(argc==2)
	maxlen=atoi(argv[1]);
if(maxlen==0)
	maxlen=10;
print_shellcode((char *)shellcode,maxlen);
printf(" /*size :%d */\n",strlen((char *)shellcode));
return 0;
}

