def guess_external_ip():
    gateways = netifaces.gateways()
    try:
        ifnet = gateways['default'][netifaces.AF_INET][1]
        return netifaces.ifaddresses(ifnet)[netifaces.AF_INET][0]['addr']
    except (__HOLE__, IndexError):
        return
dataset/ETHPy150Open deliveryhero/lymph/lymph/utils/sockets.py/guess_external_ip