Subversion Repositories vgwhois

Rev

Rev 11 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11 Rev 22
Line 2... Line 2...
2
 
2
 
3
#
3
#
4
#  VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
4
#  VGWhoIs (ViaThinkSoft Global WhoIs, a fork of generic Whois / gwhois)
5
#  Subprogram: bi TLD whois
5
#  Subprogram: bi TLD whois
6
#
6
#
7
#  (c) 2015 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
7
#  (c) 2015-2019 by Daniel Marschall, ViaThinkSoft <info@daniel-marschall.de>
8
#
8
#
9
#  License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2)
9
#  License: https://www.gnu.org/licenses/gpl-2.0.html (GPL version 2)
10
#
10
#
11
 
11
 
12
use warnings;
12
use warnings;
Line 32... Line 32...
32
my ($protocol, $hostname) = VGWhoIs::Utils::splitProtocolHost($host);
32
my ($protocol, $hostname) = VGWhoIs::Utils::splitProtocolHost($host);
33
 
33
 
34
#print "Querying $hostname with $protocol.\n";
34
#print "Querying $hostname with $protocol.\n";
35
 
35
 
36
# Get session URL
36
# Get session URL
-
 
37
 
-
 
38
my $match = 'name="card" value="(.*?)';
-
 
39
my $text = '';
37
my ($text, $exitcode) = VGWhoIs::Core::wwwsgrep($host,'name="card" value="(.*?)');
40
my ($line, $exitcode) = VGWhoIs::Core::getsource($host);
38
if ($exitcode) {
41
if (!$exitcode) {
-
 
42
	$line =~ s/\n/ /g;
-
 
43
	if ($line =~ $match) {
-
 
44
		($text) = $line =~ /$match/s;
-
 
45
	}
-
 
46
} else {
39
	# print STDERR "Query to web server failed.\n";
47
	# print STDERR "Query to web server failed.\n";
40
	print $text;
48
	print $text;
41
	exit $exitcode;
49
	exit $exitcode;
42
}
50
}
43
 
51