MISP / misp-warninglists

Warning lists to inform users of MISP about potential false-positives or other information in indicators
http://misp.github.io/misp-warninglists/
519 stars 170 forks source link

Outdated lists: 2ip.tools is now parking #51

Closed cgi1 closed 6 years ago

cgi1 commented 6 years ago

2ip.tools is now a parking domain and does not provide any "what is my ip service" anymore

cgi1 commented 6 years ago

In addition, the following domains are not resolving to any IP address right now:

Domains not resolving to an IP:
-------------------------------
checkip.dyndns.info
getmyip.co.uk
ip.telize.com
j.maxmind.com
myip.gratis
myip.mx
myip.opendns.com
myip.si
qualmeuip.com.br
whatismyip.everdot.org
w.hatsmyip.com
whoer.me
your-ip-fast.com
"""
Script to check json lists of domains which does not return any IP
author: CGi Christoph Giese
"""

import socket
import os
import json

def get_ips_for_host(host):
    try:
        ips = socket.gethostbyname_ex(host)
    except socket.gaierror:
        ips = []

    if len(ips) == 0:
        print("%s" % host)
    elif '62.138.239.45' in ips[2] or '62.138.238.45' in ips[2]:
        # Telekom DNS responding to NXDomains
        print("%s" % host)

    return ips

file_path = os.getcwd() + '/whats-my-ip/list.json'

print("Domains not resolving to an IP:")
print("-------------------------------")

with open(file_path) as fin:
    try:
        json_data = json.load(fin)
    except:
        print("Failed to load JSON")

    for line in json_data['list']:
        get_ips_for_host(line.rstrip())
adulau commented 6 years ago

Good idea. Could you do a pull-request with the updated JSON? Thank you very much

cgi1 commented 6 years ago

Sure :) #52

adulau commented 6 years ago

Thank you.