LayeredStudio / whoiser

🌍 Easy to use WHOIS info for domains, TLDs and IPs
MIT License
215 stars 32 forks source link

Adding a new option to show/hide WHOIS protected data in response #96

Closed elshahat closed 1 year ago

elshahat commented 1 year ago

I have added a new option to the parseDomainWhois function to allow returning the protected whois data based on the true/false value for the newly added option: ignorePrivacy

The default value is true

AndreiIgna commented 1 year ago

hey @elshahat thanks for adding this option. I'll check and test it in the next few days, then include it in the next release

elshahat commented 1 year ago

Hi @AndreiIgna I have included a quick update in the parser file. In the response body there is a key/value inside the object for the "Last update Last update of WHOIS database" like this: '>>> Last update of WHOIS database': '2023-02-06T07:00:00Z <<<',

After my update it will be: 'Last update of WHOIS database': '2023-02-06T07:00:00Z',

AndreiIgna commented 1 year ago

hey @elshahat I just tested both updates, and the first one for ignorePrivacy looks good and ready to merge.

The second one I don't think is ready yet though. I've tested it on a few domains and it has some unintended effects as well.

Before:

Screenshot 2023-02-06 at 14 18 59

After:

Screenshot 2023-02-06 at 14 18 25

There are many WHOIS servers that include html or < > characters in response, and this global replace would modify data that shouldn't be modified.

For the moment, can you revert this commit so we can merge & release the ignorePrivacy option? This change can be done in another Pull Request and with some more specific testing for it

elshahat commented 1 year ago

Hi @AndreiIgna, Thanks for your response, I have reverted my last commit and will check this change again and try to find a better solution

AndreiIgna commented 1 year ago

Thanks, this is now included in release v1.16