'get interfaces and check status connection'

@staticmethod
def get_interfaces():

    interfaces = {'activated': [None, None], 'all': [], 'gateway': None, 'IPaddress': None}
    interfaces['all'] = netifaces.interfaces()
    try:
        interfaces['gateway'] = netifaces.gateways()['default'][netifaces.AF_INET][0]
        interfaces['activated'][0] = netifaces.gateways()['default'][netifaces.AF_INET][1]
        interfaces['IPaddress'] = Refactor.get_Ipaddr(interfaces['activated'][0])
        itype = None
        iface = interfaces['activated'][0]
        if (iface[:(-1)] in ['ppp']):
            itype = 'ppp'
        elif (iface[:2] in ['wl', 'wi', 'ra', 'at']):
            itype = 'wireless'
        elif (iface[:2] in ['en', 'et']):
            itype = 'ethernet'
        interfaces['activated'][1] = itype
    except KeyError:
        print 'Error:    find    network    interface    '
    return interfaces
