atenreiro / opensquat

The openSquat is an open-source tool for detecting domain look-alikes by searching for newly registered domains that might be impersonating legit domains and brands.
https://opensquat.com
GNU General Public License v3.0
685 stars 130 forks source link

Add whoisrd datasource #48

Closed uBadRequest closed 3 years ago

uBadRequest commented 3 years ago

Is your feature request related to a problem? Please describe. We need to pull in more domains. Lets use whoisds.com

Describe the solution you'd like

def getNewlyRegisteredDomains(self, date, output_path):
        base64_date = base64.b64encode((date + '.zip').encode()).decode()
        url = 'https://www.whoisds.com/whois-database/newly-registered-domains/' + base64_date + '/nrd'
        headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.2; Trident/7.0; rv:11.0) like Gecko'}
        result = requests.get(url, headers=headers)
        statuscode = result.status_code
        if statuscode == 200:
            with open(output_path, 'wb') as f:
                f.write(result.content)
            return True
        else:
            return False
atenreiro commented 3 years ago

Hello @uBadRequest

Sorry I missed the issue notification.

From what I could see, the domains from whoisds are already included in the daily openSquat feeds (domain-names.txt)

Is there any domain/ccTLD that is available at whoisds but not in the openSquat feeds?