def _ifconfig_getnode():
    """Get the hardware address on Unix by running ifconfig."""
    import os
    for dir in ['', '/sbin/', '/usr/sbin']:
        try:
            pipe = os.popen(os.path.join(dir, 'ifconfig'))
        except __HOLE__:
            continue
        for line in pipe:
            words = line.lower().split()
            for i in range(len(words)):
                if words[i] in ['hwaddr', 'ether']:
                    return int(words[i + 1].replace(':', ''), 16)
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/third_party/uuid/uuid.py/_ifconfig_getnode