Trusty Python: Shielding Domains with Reputation Checks.

Domain Reputation API use case.


Sometimes as a webmaster you have to check reputation data for certain domain and there is a very useful online service for web developers and SEO professionals on "WhoisXML API" that provides Domain & IP Data Intelligence for Greater Enterprise Security and RESTful APIs that we will use.

Using it's APIs you can perform many handy data requests, for example check Reputation data of a certain domain name. The tool uses hundreds of parameters to calculate reputation scores like host configuration, SSL certificates, WHOIS records, nameserver configuration and many more.
You will need to register and get your personal API key.

Domain Reputation check.



This Python script below will use information from "WhoisXML API" and present it in text form as a output without the need to use a web browser.
Checking domain reputation can be easily automated now !


Python code to check Domain Reputation:



# Domain Reputation API USE
import requests


website = 'yandex.ru'

APIKEY ='at_ZUVkrukr4Uhhhsfq2j6dyv2VhFGWYV'
   
domain_reputation = f'https://domain-reputation.whoisxmlapi.com/api/v2?apiKey={APIKEY}&domainName={website}'

r = requests.get(domain_reputation)

domain_reputation_info = r.text.lower()

print(f'For {website} domain.')
domain_reputation_info


Domain Reputation check output:



For yandex.ru domain.
{"mode":"fast","reputationscore":88.11,"testresults":[{"test":"whois domain check","testcode":93,"warnings":[{"warningdescription":"owner details are publicly available","warningcode":2009}]},{"test":"ssl certificate validity","testcode":87,"warnings":[{"warningdescription":"recently obtained certificate, valid from  2022-08-19 10:19:21","warningcode":6001}]},{"test":"ssl vulnerabilities","testcode":88,"warnings":[{"warningdescription":"http strict transport security not set","warningcode":6015},{"warningdescription":"tlsa record not configured or configured wrong","warningcode":6019},{"warningdescription":"ocsp stapling not configured","warningcode":6006}]}]}




See also related topics: