The Wayback Machine - https://web.archive.org/web/20201201054852/https://github.com/io-developer/php-whois/issues/91
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid .ir parsing #91

Open
mhf-ir opened this issue Nov 21, 2019 · 5 comments
Open

Invalid .ir parsing #91

mhf-ir opened this issue Nov 21, 2019 · 5 comments
Labels

Comments

@mhf-ir
Copy link

@mhf-ir mhf-ir commented Nov 21, 2019

PHP-Whois version: 3.4.3

PHP version: 7.3.11

Description
test mhf.ir domain

How to reproduce

<?php

        $whois = Whois::create();
        $info = $whois->loadDomainInfo('mhf.ir');
        var_dump($info->getCreationDate()); // 0 or null
        var_dump($info->getExpirationDate()); // 0 or null
        var_dump($info->getOwner()); // null or address instead

Possible Solution
Check regex i think

Additional context
http://whois.nic.ir/WHOIS?name=mhf.ir

@mhf-ir mhf-ir changed the title Invalid .ir Invalid .ir parsing Nov 21, 2019
@mhf-ir
Copy link
Author

@mhf-ir mhf-ir commented Nov 21, 2019

.ir It's 11nd of total usage in world:
https://w3techs.com/technologies/overview/top_level_domain

@io-developer
Copy link
Owner

@io-developer io-developer commented Nov 21, 2019

Note: possible custom query. whois-cli uses:

whois mhf.ir --verbose
Using server whois.nic.ir.
Query string: "-V Md5.2 mhf.ir"
@mhf-ir
Copy link
Author

@mhf-ir mhf-ir commented Nov 21, 2019

whois mhf.ir --verbose
Using server whois.nic.ir.
Query string: "-V Md5.2 mhf.ir"

% This is the IRNIC Whois server v1.6.2.
% Available on web at http://whois.nic.ir/
% Find the terms and conditions of use on http://www.nic.ir/
% 
% This server uses UTF-8 as the encoding for requests and responses.

% NOTE: This output has been filtered.

% Information related to 'mhf.ir'


domain:		mhf.ir
ascii:		mhf.ir
remarks:	(Domain Holder) Muhammad Hussein Fattahizadeh
remarks:	(Domain Holder Address) No. 125, 4 West St, Janbazan Av., Semnan, Semnan, IR
holder-c:	mf233-irnic
admin-c:	no297-irnic
tech-c:		no297-irnic
bill-c:		no297-irnic
nserver:	ns1.aasaam.net
nserver:	ns2.aasaam.net
nserver:	ns3.aasaam.net
nserver:	ns4.aasaam.net
last-updated:	2018-04-27
expire-date:	2020-09-23
source:		IRNIC # Filtered

nic-hdl:	mf233-irnic
person:		Muhammad Hussein Fattahizadeh
e-mail:		semnanweb@gmail.com
address:	No. 125, 4 West St, Janbazan Av., Semnan, Semnan, IR
phone:		+98 231 3583834
source:		IRNIC # Filtered

nic-hdl:	no297-irnic
org:		Noavaran Shabake Sabz Mehregan (HostIran Networks)
e-mail:		esmailian@hostiran.com
address:	#16, 2nd block , 1000 Building , Seydkhandan Bridge , Shariati st., Tehran, Tehran, IR
phone:		+982122880312
fax-no:		+982122880311
source:		IRNIC # Filtered

@io-developer
Copy link
Owner

@io-developer io-developer commented Nov 21, 2019

Just left note for future. No time to fix now.
Also you can try to tune https://github.com/io-developer/php-whois/blob/master/src/Iodev/Whois/Configs/module.tld.servers.json
There are some examples with custom query (.DE if I remeber)

@io-developer
Copy link
Owner

@io-developer io-developer commented Nov 25, 2019

Not confirmed. It's loading and parsing very good from a box.
Anyway I added in master extra host with query format.

Also added unit test case.
Found one issue and can't fix it in near future due to other one test fails.
Issue is: owner field is fillied from 'address' instead of 'person'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.