summaryrefslogblamecommitdiff
path: root/cgi/4or6.c
blob: 1cf6780d0c061081fcc85c4e2df0e498dc21e03e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                               
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
	printf("Content-type: text/plain\n\n");
	if(!getenv("REMOTE_ADDR"))return 0;
	char* s=getenv("REMOTE_ADDR");
	if(getenv("HTTP_X_FORWARDED_FOR"))
	s=getenv("HTTP_X_FORWARDED_FOR");
	if(strchr(s,':')!=NULL)puts("6");
	else puts("4");
	return 0;
}