xandco/whoisproxy

Whois Proxy,通过 HTTP 代理查询 whois 服务器。

v1.0.0 2020-11-29 08:09 UTC

This package is auto-updated.

Last update: 2024-09-29 05:41:45 UTC


README

Latest Version on Packagist Total Downloads License

Whois Proxy 允许您轻松地从 HTTP 代理后查询 whois 服务器。

在查询过程中,该软件包将连接到您提供的 HTTP 代理。一旦成功连接,该软件包将查询默认的 whois 服务器,或提供的 whois 服务器在 43 端口上,使用提供的域名,当成功时,该软件包将返回原始 whois 查询。

此仅用于教育目的,并不意图绕过这些 whois 服务器可能实施的任何速率限制或 IP 封禁系统。使用风险自担。

安装

使用 composer 安装此软件包

$ composer require xandco/whoisproxy

必须安装此服务提供者(如果使用的是 Laravel 5.5 以下版本)

// config/app.php

'providers' => [
    WhoisProxy\WhoisProxyServiceProvider::class,
];

使用以下命令发布并自定义配置文件

$ php artisan vendor:publish --provider="WhoisProxy\WhoisProxyServiceProvider"

使用方法

创建新的 WhoisProxy 对象

use WhoisProxy\WhoisProxy;
...
$whoisProxy = new WhoisProxy( $options = [] );

然后调用 query() 方法查询 whois 服务器

// This will query the default whois server
$whoisProxy->query( 'example.com' );

// You can also provide a specific whois server
$whoisProxy->query( 'example.com', 'whois.verisign-grs.com' );

您还可以调用 deepQuery() 方法来自动查找并查询指定域的最权威 whois 服务器(通常是注册商的 whois 服务器)

$whoisProxy->deepQuery( 'example.com' );

以下是输出示例

Domain Name: EXAMPLE.COM
Registry Domain ID: 2336799_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.iana.org
Registrar URL: http://res-dom.iana.org
Updated Date: 2019-08-14T07:04:41Z
Creation Date: 1995-08-14T04:00:00Z
Registry Expiry Date: 2020-08-13T04:00:00Z
Registrar: RESERVED-Internet Assigned Numbers Authority
Registrar IANA ID: 376
Registrar Abuse Contact Email:
Registrar Abuse Contact Phone:
Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
Name Server: A.IANA-SERVERS.NET
Name Server: B.IANA-SERVERS.NET
DNSSEC: signedDelegation
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2020-07-07T07:56:32Z <<<

For more information on Whois status codes, please visit https://icann.org/epp

...

选项

在创建 WhoisProxy 对象时,您可以传递一个参数:$options

选项数组参数

您可以在创建对象时设置这些选项,也可以在配置文件中全局设置这些选项。您可以在安装部分中发布配置并进行自定义。

变更日志

请参阅变更日志以获取有关最近更改的更多信息。

测试

$ composer test

贡献

请参阅 contributing.md 以获取详细信息和一个待办事项列表。

安全

如果您发现任何与安全相关的问题,请通过电子邮件 hello@xand.co 而不是使用问题跟踪器。

鸣谢

许可

MIT - 请参阅 许可文件 以获取更多信息。