fixed reporting of ip query information

This commit is contained in:
sparc 2007-05-09 07:37:32 +00:00
parent 48a3ff5d89
commit 6fec513954
4 changed files with 18 additions and 6 deletions

View file

@ -1,3 +1,6 @@
2007/05/09
- fixed reporting of ip query information
2007/05/04
- fixes to ip handler and APNIC ip handler

View file

@ -260,10 +260,18 @@ class WhoisClient {
{
$info = array(
'server'=> $this->Query['server'],
'args' => $this->Query['args'],
'port' => $this->Query['server_port']
);
if (!empty($this->Query['args']))
$info['args'] = $this->Query['args'];
else
$info['args'] = $this->Query['query'];
if (!empty($this->Query['server_port']))
$info['port'] = $this->Query['server_port'];
else
$info['port'] = 43;
if (isset($result['regyinfo']['whois']))
unset($result['regyinfo']['whois']);

View file

@ -78,7 +78,7 @@ class ip_handler extends WhoisClient
$this->Query = array();
$this->Query['server'] = 'whois.arin.net';
$this->Query['string'] = $query;
$this->Query['query'] = $query;
reset($this->REGISTRARS);
@ -150,17 +150,17 @@ class ip_handler extends WhoisClient
if ($newquery != '')
{
$result = $this->set_whois_info($result);
//$result = $this->set_whois_info($result);
$result['regyinfo']['netname'] = $newquery;
if (strstr($newquery, 'BRAZIL-BLK'))
{
{
$this->Query['server'] = 'whois.registro.br';
$result['regyinfo']['registrar'] = 'Comite Gestor da Internet no Brasil';
$rawdata = $this->GetRawData($query);
break;
}
$rawdata = $this->GetRawData('!'.$newquery);
}
else

View file

@ -108,6 +108,7 @@ class Whois extends WhoisClient
// Prepare to do lookup via the 'ip' handler
$ip = @gethostbyname($query);
$this->Query['server'] = 'whois.arin.net';
$this->Query['args'] = $ip;
$this->Query['host_ip'] = $ip;
$this->Query['file'] = 'whois.ip.php';
$this->Query['handler'] = 'ip';