blob: 1cf6780d0c061081fcc85c4e2df0e498dc21e03e (
plain) (
tree)
|
|
#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;
}
|