jsmitty12 / phpwhois Goto Github PK
View Code? Open in Web Editor NEWThis project forked from phpwhois/phpwhois
phpWhois general repository
License: GNU General Public License v2.0
This project forked from phpwhois/phpwhois
phpWhois general repository
License: GNU General Public License v2.0
Problem 1
- The requested package jsmitty12/phpwhois No version set (parsed as 1.0.0) is satisfiable by jsmitty12/phpwhois[No version set (parsed as 1.0.0)] but these conflict with your requirements or minimum-stability.
google.co.uk is returning:
[created] => 24-Feb-2001
[expires] => 24-Feb-2019
[changed] => 23-Feb-2018
it should be:
[created] => 2001-02-24
[expires] => 2019-02-24
[changed] => 2018-02-23
There is a unit test for .uk but not for .co.uk
I can't spot the bug
Reported by David Gnedt (SBA Research)
Documentation: https://blog.nettitude.com/uk/cve-2015-5243-phpwhois-remote-code-execution
@jsmitty12 Hi. The lib algo26-matthias/idna-convert is locked on ^2. This version seems to have problems with some letters (e.g. ć) . When do you think you can update to the newest version of the lib?
output of 207.237.77.123
has excessive numeric keys:
^ array:3 [
"regrinfo" => array:5 [
....
"network" => array:2 [
0 => array:7 [
"inetnum" => "207.237.0.0 - 207.237.255.255"
"name" => "RCN-BLK-13"
"handle" => "NET-207-237-0-0-1"
"status" => "Direct Allocation"
"created" => "2013-07-09"
"changed" => "2017-01-28"
"desc" => array:1 [
0 => "For all abuse issues, please contact [email protected]"
]
]
1 => array:5 [
"handle" => "RCN-BLK-13"
"name" => "RCN-BLK-13"
"inetnum" => "207.237.0.0 - 207.237.255.255"
"created" => "-- ::"
"changed" => "-- ::"
]
]
....
The project is suffering from a really bloated codebase. It should be cleaned up.
This includes having namespaces added (to not pollute the global scope with functions) and have correct access modifiers to internal methods and variables.
Line 905 in 3918cb2
Using whois: artphone.co.il
Problem parse date for line: "domain-registrar AT isoc.org.il 20201019 (Assigned)"
Hey @jsmitty12 do you have any thoughts about adding this fork of the repo to packagist since the original is no longer being updated?
PHP 8 is here, can you add its support in composer.json
file ?
Dear all,
I wanted to notify that I release the version v6.2.0 packagist: kevinoo/phpwhois.
Include a lot of improvements 😄
whois.[tld].php
Running PHPUnit 8.0.4 and PHP 7.2.15.
PHP Fatal error: Declaration of phpWhois\Handlers\GtldHandlerTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in phpWhois/tests/Handlers/GtldHandlerTest.php on line 75
The readme still states that you should run compose require "phpwhois/phpwhois"
. That should probably be updated to reflect this fork since it is now in Packagist.
See 17 Tips for Using Composer Efficiently:
The latest tag in this repository of v4.x
is v4.2.5
. But in the 4-stable
branch there are newer commits.
Can you please tag the latest commit of 4-stable
branch as v4.3.0
or something like that?
Thanks
Composer throws the following warning:
Package mso/idna-convert is abandoned, you should avoid using it. Use algo26-matthias/idna-convert instead.
Array
(
[rawdata] => Array
(
[0] => ostap.dev domain is not supported
)
[regrinfo] => Array
(
[domain] => Array
(
[nserver] => Array
(
)
[name] => ostap.dev
)
[registered] => yes
)
)
Recently you have added the php>7 requirement to composer. Is that really true? I had this working pretty well in 5.6 before the php dependency was added to composer.
Composer throws warning with PHP 7.2.15.
Warning: Ambiguous class resolution, "name_handler" was found in both "src/whois.gtld.name.php" and "src/whois.name.php"
The class name_handler
is duplicated.
The loop in whois.parser.php#L910 runs infinitely for values like
Creation Date: 2021-07-19T13:03:01.00Z
A print_r($res);
just before the while shows this in my case:
Array
(
[m] => 2023
[d] => 07
[y] => 19T13:03:01
)
I was wondering if this fork supported proxies? Or if it could be modified to support proxies. I do not know the technical details of how this function works, so I don't know if that's feasible or not.
Or if any of the other forks offers proxy support. If anyone has any knowledge on this, let me know. Thanks.
Currently locked to ^7.1 in composer.json. Can you please update?
The line:
eval($var . '="' . str_replace('"', '\"', $itm) . '";');
Should be:
$itm = rtrim($itm,"\\"); eval($var . '="' . str_replace('"', '\"', $itm) . '";');
Because if $itm has a \ at the end of the value, it will trigger a ParseError.
If the raw output of the whois query contains empty lines, the while loop in the get_blocks
function of file whois.parser.php
stops before all lines are processed.
The reason is obvious:
while ($val = current($rawdata))
$val
is falsy when the line is empty.
Imho this is a big issue. Because Whois is telling that a domain is free, although it is wrong.
I'm getting the following error when trying to query e.g. nic.de:
Notice: Undefined index: changed in phpWhois/whois.de.php on line 67
Nevertheless the library is getting the following response from whois.nic.de (as specified in whois.servers.php):
Domain: nic.de
Status: connect
The problem seems to be the same as in https://bugs.archlinux.org/task/13036 meaning the query parameters "-T dn,ace" are missing for whois.nic.de
Hi,
.ca lookups are broken. We think this happen since .ca registry updated their registry software at the beginning of the month. Whois format for .ca domains seem to have changed.
We get notice like :
Severity: Notice --> Undefined offset: 1 /var/www/sites/potato/vendor/jsmitty12/phpwhois/src/whois.ca.php 56
When installing via: composer require jsmitty12/phpWhois
I get:
[RuntimeException]
Failed to extract jsmitty12/phpwhois: (50) unzip -qq -o '/Users/daniel/Downloads/Open-DMARC-Analyzer-master/vendor/composer/tmp-12cb950128d4609814ca7e1c09122b8c' -d '/Users/daniel/Downloads/Open
-DMARC-Analyzer-master/vendor/composer/4f8f1150'
error: cannot create /Users/daniel/Downloads/Open-DMARC-Analyzer-master/vendor/composer/4f8f1150/jsmitty12-phpWhois-4d56dfb/tests/fixtures/ÐÇðÁð¦.ÐÇÐä.txt
Illegal byte sequence
Provided a .org domain with the following response (from rawdata) with dates in Y-m-dTH:i:sZ
format:
Updated Date: 2019-09-16T15:39:04Z
Creation Date: 2012-10-01T15:32:42Z
Registry Expiry Date: 2020-10-01T15:32:42Z
The parsed information in regrinfo
has incorrect dates when Y-m-d could theoretically also be Y-d-m. (e.g. 10-01)
changed: 2019-09-16
created: 2012-01-10
expires: 2020-01-10
Created and expires should be 10-01, changed is fine.
Does not seem to happen exclusively on .org domains.
Somewhat related to #38
Using jsmitty12/phpwhois#5.5.0
.
$whoisTarget = 'proper-full-domain.tld';
$whois = new Whois();
$result = $whois->lookup($whoisTarget);
PHP 7.2 deprecated the each()
function. One suggested replacement is a simple foreach()
, but it cannot be done blindly. Unfortunately, the initial removal of the each()
function was a blind foreach()
replacement.
I am getting this msg
Array and string offset access syntax with curly braces is deprecated in /var/www/dbill.com/public/vendor/algo26-matthias/idna-convert/src/UnicodeTranscoder.php
After searching, I found this package is using old version (2.0) of algo26-matthias/idna-convert . But now 3.4 is running. Please update the required option.
Example: modx.today
I am getting this error when install
jsmitty12/phpwhois v5.6.4 requires algo26-matthias/idna-convert ^2.0 -> satisfiable by algo26-matthias/idna-convert[v2.0.1, v2.0.2, v2.1.0] but these conflict with your requirements or minimum-stability.
I have already installed algo26-matthias/idna-convert ^3.0
composer version : 1.10.15
php version : 7.4.3
Not sure if this is expected;
+codeVersion: "5.0.0-dev",
+version: "phpWhois v5.0.0-dev",
}
>>> $whois->deepWhois = true;
=> true
>>> $result = $whois->lookup('example.com');
=> [
"regrinfo" => [
"domain" => [
"name" => "example.com",
"changed" => "2020-08-14",
"created" => "1995-08-14",
"expires" => "2021-08-13",
"status" => [
"clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited",
"clientTransferProhibited https://icann.org/epp#clientTransferProhibited",
"clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited",
],
"nserver" => [
"a.iana-servers.net" => "199.43.135.53",
"b.iana-servers.net" => "199.43.133.53",
],
],
"registered" => "yes",
],
"regyinfo" => [
"registrar" => "RESERVED-Internet Assigned Numbers Authority",
"servers" => [
[
"server" => "com.whois-servers.net",
"args" => "domain =example.com",
"port" => 43,
],
],
"type" => "domain",
],
"rawdata" => [
" Domain Name: EXAMPLE.COM\r",
" Registry Domain ID: 2336799_DOMAIN_COM-VRSN\r",
" Registrar WHOIS Server: whois.iana.org\r",
" Registrar URL: http://res-dom.iana.org\r",
" Updated Date: 2020-08-14T07:02:37Z\r",
" Creation Date: 1995-08-14T04:00:00Z\r",
" Registry Expiry Date: 2021-08-13T04:00:00Z\r",
" Registrar: RESERVED-Internet Assigned Numbers Authority\r",
" Registrar IANA ID: 376\r",
" Registrar Abuse Contact Email:\r",
" Registrar Abuse Contact Phone:\r",
" Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited\r",
" Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited\r",
" Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited\r",
" Name Server: A.IANA-SERVERS.NET\r",
" Name Server: B.IANA-SERVERS.NET\r",
" DNSSEC: signedDelegation\r",
" DNSSEC DS Data: 31589 8 1 3490A6806D47F17A34C29E2CE80E8A999FFBE4BE\r",
" DNSSEC DS Data: 31589 8 2 CDE0D742D6998AA554A92D890F8184C698CFAC8A26FA59875A990C03E576343C\r",
" DNSSEC DS Data: 43547 8 1 B6225AB2CC613E0DCA7962BDC2342EA4F1B56083\r",
" DNSSEC DS Data: 43547 8 2 615A64233543F66F44D68933625B17497C89A70E858ED76A2145997EDF96A918\r",
" DNSSEC DS Data: 31406 8 1 189968811E6EBA862DD6C209F75623D8D9ED9142\r",
" DNSSEC DS Data: 31406 8 2 F78CF3344F72137235098ECBBD08947C2C9001C7F6A085A17F518B5D8F6B916D\r",
" URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/\r",
">>> Last update of whois database: 2020-12-22T07:59:27Z <<<\r",
"\r",
"For more information on Whois status codes, please visit https://icann.org/epp\r",
"\r",
"NOTICE: The expiration date displayed in this record is the date the\r",
"registrar's sponsorship of the domain name registration in the registry is\r",
"currently set to expire. This date does not necessarily reflect the expiration\r",
"date of the domain name registrant's agreement with the sponsoring\r",
"registrar. Users may consult the sponsoring registrar's Whois database to\r",
"view the registrar's reported date of expiration for this registration.\r",
"\r",
"TERMS OF USE: You are not authorized to access or query our Whois\r",
"database through the use of electronic processes that are high-volume and\r",
"automated except as reasonably necessary to register domain names or\r",
"modify existing registrations; the Data in VeriSign Global Registry\r",
"Services' ("VeriSign") Whois database is provided by VeriSign for\r",
"information purposes only, and to assist persons in obtaining information\r",
"about or related to a domain name registration record. VeriSign does not\r",
"guarantee its accuracy. By submitting a Whois query, you agree to abide\r",
"by the following terms of use: You agree that you may use this Data only\r",
"for lawful purposes and that under no circumstances will you use this Data\r",
"to: (1) allow, enable, or otherwise support the transmission of mass\r",
"unsolicited, commercial advertising or solicitations via e-mail, telephone,\r",
"or facsimile; or (2) enable high volume, automated, electronic processes\r",
"that apply to VeriSign (or its computer systems). The compilation,\r",
"repackaging, dissemination or other use of this Data is expressly\r",
"prohibited without the prior written consent of VeriSign. You agree not to\r",
"use electronic processes that are automated and high-volume to access or\r",
"query the Whois database except as reasonably necessary to register\r",
"domain names or modify existing registrations. VeriSign reserves the right\r",
"to restrict your access to the Whois database in its sole discretion to ensure\r",
"operational stability. VeriSign may restrict or terminate your access to the\r",
"Whois database for failure to abide by these terms of use. VeriSign\r",
"reserves the right to modify these terms at any time.\r",
"\r",
"The Registry database contains ONLY .COM, .NET, .EDU domains and\r",
"Registrars.\r",
],
]
>>>
How can I retrieve owner/admin/technical contact info?
If I compare to querying an Israeli domain, this information appears to be parsed;
>>> $whois->lookup('artphone.co.il');
PHP Warning: A non-numeric value encountered in /var/www/vendor/jsmitty12/phpwhois/src/whois.parser.php on line 905
PHP Warning: A non-numeric value encountered in /var/www/vendor/jsmitty12/phpwhois/src/whois.parser.php on line 905
PHP Warning: A non-numeric value encountered in /var/www/vendor/jsmitty12/phpwhois/src/whois.parser.php on line 905
PHP Warning: A non-numeric value encountered in /var/www/vendor/jsmitty12/phpwhois/src/whois.parser.php on line 905
=> [
"regrinfo" => [
"disclaimer" => [
"The data in the WHOIS database of the .il registry is provided",
"by ISOC-IL for information purposes, and to assist persons in",
"obtaining information about or related to a domain name",
"registration record. ISOC-IL does not guarantee its accuracy.",
"By submitting a WHOIS query, you agree that you will use this",
"Data only for lawful purposes and that, under no circumstances",
"will you use this Data to: (1) allow, enable, or otherwise",
"support the transmission of mass unsolicited, commercial",
"advertising or solicitations via e-mail (spam);",
"or (2) enable high volume, automated, electronic processes that",
"apply to ISOC-IL (or its systems).",
"ISOC-IL reserves the right to modify these terms at any time.",
"By submitting this query, you agree to abide by this policy.",
],
"registered" => "yes",
"admin" => [
"name" => "Edoard Yegudaev",
"phone" => "+972 54 7638688",
"fax" => "+972 54 7638688",
"email" => "Edoard1987 AT gmail.com",
"handle" => "BZ-EY1995-IL",
"changed" => "2000-00-00",
],
"tech" => [
"name" => "Edoard Yegudaev",
"phone" => "+972 54 7638688",
"fax" => "+972 54 7638688",
"email" => "Edoard1987 AT gmail.com",
"handle" => "BZ-EY1996-IL",
"changed" => "2000-00-00",
],
"zone" => [
"name" => "Edoard Yegudaev",
"phone" => "+972 54 7638688",
"fax" => "+972 54 7638688",
"email" => "Edoard1987 AT gmail.com",
"handle" => "BZ-EY1997-IL",
"changed" => "2000-00-00",
],
"domain" => [
"query" => "artphone.co.il",
"reg-name" => "artphone",
"domain" => "artphone.co.il",
"descr" => [
"Artphone",
"NATANZON 28",
"HAIFA",
"Israel",
],
"phone" => "+972 54 7638688",
"fax" => "+972 54 7638688",
"email" => "Edoard1987 AT gmail.com",
"nserver" => [
"ns1.bezeqint.net" => "62.219.128.128",
"ns2.bezeqint.net" => "212.179.7.7",
"ns3.bezeqint.net" => "192.115.132.132",
],
"validity" => "19-10-2021",
"dnssec" => "unsigned",
"status" => "Transfer Locked",
"changed" => "2000-00-00",
"name" => "artphone.co.il",
],
],
"regyinfo" => [
"referrer" => "http://www.isoc.org.il/",
"registrar" => "ISOC-IL",
"servers" => [
[
"server" => "whois.isoc.org.il",
"args" => "artphone.co.il",
"port" => 43,
],
],
"type" => "domain",
],
"rawdata" => [
"",
"% The data in the WHOIS database of the .il registry is provided",
"% by ISOC-IL for information purposes, and to assist persons in ",
"% obtaining information about or related to a domain name ",
"% registration record. ISOC-IL does not guarantee its accuracy.",
"% By submitting a WHOIS query, you agree that you will use this",
"% Data only for lawful purposes and that, under no circumstances",
"% will you use this Data to: (1) allow, enable, or otherwise ",
"% support the transmission of mass unsolicited, commercial ",
"% advertising or solicitations via e-mail (spam); ",
"% or (2) enable high volume, automated, electronic processes that ",
"% apply to ISOC-IL (or its systems).",
"% ISOC-IL reserves the right to modify these terms at any time.",
"% By submitting this query, you agree to abide by this policy.",
" ",
"query: artphone.co.il",
"",
"reg-name: artphone",
"domain: artphone.co.il",
"",
"descr: Artphone",
"descr: NATANZON 28",
"descr: HAIFA",
"descr: Israel",
"phone: +972 54 7638688",
"fax-no: +972 54 7638688",
"e-mail: Edoard1987 AT gmail.com",
"admin-c: BZ-EY1995-IL",
"tech-c: BZ-EY1996-IL",
"zone-c: BZ-EY1997-IL",
"nserver: Ns1.bezeqint.net ",
"nserver: Ns2.bezeqint.net ",
"nserver: Ns3.bezeqint.net ",
"validity: 19-10-2021",
"DNSSEC: unsigned",
"status: Transfer Locked",
"changed: domain-registrar AT isoc.org.il 20201019 (Assigned)",
"",
"person: Edoard Yegudaev",
"address Artphone",
"address NATANZON 28",
"address HAIFA",
"address Israel",
"phone: +972 54 7638688",
"fax-no: +972 54 7638688",
"e-mail: Edoard1987 AT gmail.com",
"nic-hdl: BZ-EY1995-IL",
"changed: domain-registrar AT isoc.org.il 20201019",
"",
"person: Edoard Yegudaev",
"address Artphone",
"address NATANZON 28",
"address HAIFA",
"address Israel",
"phone: +972 54 7638688",
"fax-no: +972 54 7638688",
"e-mail: Edoard1987 AT gmail.com",
"nic-hdl: BZ-EY1996-IL",
"changed: domain-registrar AT isoc.org.il 20201019",
"",
"person: Edoard Yegudaev",
"address Artphone",
"address NATANZON 28",
"address HAIFA",
"address Israel",
"phone: +972 54 7638688",
"fax-no: +972 54 7638688",
"e-mail: Edoard1987 AT gmail.com",
"nic-hdl: BZ-EY1997-IL",
"changed: domain-registrar AT isoc.org.il 20201019",
"",
"registrar name: Bezeq International Ltd",
"registrar info: https://www.bezeqint.net/web/domains/search-domain",
"",
"% Rights to the data above are restricted by copyright.",
],
]
roave/security-advisories helps to identify dependencies with known security vulnerabilities.
First off, thanks for making a fork that's not dead.
$whois = new Whois();
$result = $whois->lookup('2607:f8b0:4007:811:0:0:0:200e');
Seems to get you the most generic result...
"inet6num: ::/0",
"netname: IANA-BLK",
"descr: The whole IPv6 address space",
When querying whois in console whois 2607:f8b0:4007:811:0:0:0:200e
I get different results with more useful information
NetRange: 2607:F8B0:: - 2607:F8B0:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
CIDR: 2607:F8B0::/32
NetName: GOOGLE-IPV6
I'm not sure what to make of this, mostly posing this to the community in case someone knows more than me about what's going on with ipv6 addresses and how I should address this problem. I suspect that I'll just end up needing to specify a different whois server.
version "jsmitty12/phpwhois": "^5.0"
For example:
Array
(
[rawdata] => Array
(
[0] => cityescape.ph domain is not supported
)
[regrinfo] => Array
(
[domain] => Array
(
[nserver] => Array
(
)
[name] => cityescape.ph
)
[registered] => yes
)
)
Hello, is there a way to filter premium domains? srv.biz appears as free for me, but costs more due to premium domains.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.