summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (lxpbuetow) <paul.buetow@1und1.de>2014-12-30 13:29:46 +0100
committerPaul Buetow (lxpbuetow) <paul.buetow@1und1.de>2014-12-30 13:29:46 +0100
commit6dc9e0948e0c61cc8bfba98a33084660aee4ddef (patch)
tree6d30a5f4fef65e829d4766d1f9bd9295903e0280
parent850908c134697b31bf9e769136c8061759185243 (diff)
update this for FreeBSD 10.1
-rwxr-xr-xindex.pl14
1 files changed, 6 insertions, 8 deletions
diff --git a/index.pl b/index.pl
index 9bc44e5..4da2f55 100755
--- a/index.pl
+++ b/index.pl
@@ -3,8 +3,6 @@
use strict;
use warnings;
-use Shell qw(host dig);
-
print <<END;
Content-type: text/html
@@ -54,12 +52,12 @@ print "<pre>You are using <b>" . do {
} . "</b>\n";
-chomp (my $remote = host($ENV{REMOTE_ADDR}));
-chomp (my $server = host($ENV{SERVER_ADDR}));
-chomp (my $server0 = host($ENV{SERVER_NAME}));
-chomp (my $digremote = dig('-x', $ENV{REMOTE_ADDR}));
-chomp (my $digserver = dig('-x', $ENV{SERVER_ADDR}));
-chomp (my $digserver0 = dig('-t', 'any', $ENV{SERVER_NAME}));
+chomp (my $remote = `host $ENV{REMOTE_ADDR}`);
+chomp (my $server = `host $ENV{SERVER_ADDR}`);
+chomp (my $server0 = `host $ENV{SERVER_NAME}`);
+chomp (my $digremote = `dig -x $ENV{REMOTE_ADDR}`);
+chomp (my $digserver = `dig -x $ENV{SERVER_ADDR}`);
+chomp (my $digserver0 = `dig -t any $ENV{SERVER_NAME}`);
print <<END;
Client address: $ENV{REMOTE_ADDR}