> recivi=recv(*sock, buff, sizeof(buff), 0);

You only send 4 bytes down the socket. Why are you trying to read 30?
Code:
char *passpointer;
int hasnull;
int letras;
passpointer = buff;
for(i=0;i<strlen(buff)+1;i++) {
	if(passpointer != '\0') {
		passpointer++;
		letras++;
	}
	else {
		hasnull=1;
	}
}
printf("has null?: %i Letras: %i\n", hasnull, letras);
Replace with:
Code:
printf("has null?: yes, eventually Letras: %lu\n", (unsigned long) strlen(buff));