0,0 → 1,53 |
#!/usr/bin/perl |
|
# |
# generic Whois - bz subprogram |
# |
# (c) 2015 by Daniel Marschall, ViaThinkSoft <www.viathinksoft.de> |
# |
# Distribution, usage etc. pp. regulated by the current version of GPL. |
# |
# |
# |
# History: |
# 2015-05-15 mar Initial release |
# |
|
use warnings; |
use strict; |
use utf8; |
|
use FindBin; |
use lib "$FindBin::Bin/../../lib/"; |
use GWhoIs::Core; |
|
if (defined $ARGV[0]) { |
$_ = join(' ', @ARGV); |
} else { |
# If no parameter is given, await an input from STDIN |
$_ = <>; |
chomp; |
} |
|
my $query = $_; |
|
my $host = "http://www.belizenic.bz/cgi-bin/Registrar_test?action=whois&action2=whois&domain="; # TODO: https? |
|
my ($protocol, $hostname) = GWhoIs::Utils::splitProtocolHost($host); |
|
#print "Querying $hostname with $protocol.\n"; |
|
my $hexstring; |
$hexstring = $query; |
$hexstring =~ s/./sprintf("%02x",ord("$&"))/eg; |
|
my ($text, $exitcode) = GWhoIs::Core::doquery($query,'cgi',$host.$hexstring,''); |
|
if ($exitcode) { |
# print STDERR "Query to web server failed.\n"; |
} |
|
print $text; |
|
exit $exitcode; |
|
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |