File: ipv6calc.cgi

package info (click to toggle)
ipv6calc 4.1.0-0.2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 8,676 kB
  • sloc: ansic: 101,567; sh: 6,796; perl: 3,867; xml: 1,475; makefile: 908
file content (33 lines) | stat: -rwxr-xr-x 675 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/perl -w -T
#
# Project    : ipv6calc/mod_ipv6calc
# File       : ipv6calc.cgi
# Version    : $Id: f33067600678714c6812091a7232451b9bd7b87d $
# Copyright  : 2019-2019 by Peter Bieringer <pb (at) bieringer.de>
#
# Simple Perl web interface to demonstrate capabilities of mod_ipv6calc

## general
use strict;
use POSIX;
use warnings;

my @envs = (
	'REMOTE_ADDR',
	'IPV6CALC_CLIENT_IP_ANON',
	'IPV6CALC_CLIENT_COUNTRYCODE',
	'IPV6CALC_CLIENT_ASN',
	'IPV6CALC_CLIENT_REGISTRY',
	'IPV6CALC_ANON_METHOD'
);

## Print output
print("Content-type: text/plain\n\n");

for my $env (@envs) {
	if ( defined $ENV{$env} ) {
		print("$env=" . $ENV{$env} . "\n");
	};
};

exit(0);