# Path: settings.py
# NETWORK_ADAPTATER = {
#     0: "Ethernet 802.3",
#     1: "Token Ring 802.5",
#     2: "Fiber Distributed Data Interface (FDDI)",
#     3: "Wide Area Network (WAN)",
#     4: "LocalTalk",
#     5: "Ethernet using DIX header format",
#     6: "ARCNET",
#     7: "ARCNET (878.2)",
#     8: "ATM",
#     9: "Wireless",
#     10: "Infrared Wireless",
#     11: "Bpc",
#     13: "CoWan",
#     14: "1394",
#     15: "Tunnel"
# }
# 
# Path: utils/utils.py
# class UnicodeJsonDumper:
# class UnicodeWriter:
# class OSVERSIONINFOEXW(ctypes.Structure):
#     def __init__(self, output):
#     def list_to_json(self, list_json):
#     def dump_json(self, entry):
#     def close_current(self):
#     def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds):
#     def writerow(self, row):
#     def writerows(self, rows):
# def find_encoding(value):
# def encode_json_dict(jdict):
# def decode_output_cmd(output):
# def mount_share(share_path, param_username, param_password):
# def unmount_share(letter):
# def change_to_MKTime(seconds):
# def convert_windate(timestamp):
# def dosdate(_dosdate, _dostime):
# def convert_string_to_hex(string):
# def get_local_drives():
# def get_removable_drives():
# def sid2username(sid):
# def str_sid2username(str_sid):
# def check_outlook_d(path):
# def look_for_outlook_dirs(paths_to_search):
# def look_for_files(dir_to_look):
# def zip_from_object(files_to_zip, zip_object, logger):
# def zip_archive(files_to_zip, zip_path, filename, logger, file_mode="w"):
# def clean(path, computer_name):
# def is_locked(filename):
# def is_open(filename):
# def is_allowed(filename):
# def is_running(name):
# def copy_file(root, path, dest):
# def check_permissions(path, logger):
# def write_to_output(str_to_write, output, logger):
# def get_terminal_decoded_string(string):
# def get_json_writer(json_file):
# def get_csv_writer(csvfile):
# def write_to_csv(arr_data, csv_writer):
# def write_list_to_csv(arr_data, csv_writer):
# def write_list_to_json(arr_data, json_writer):
# def write_to_json(header, arr_data, json_writer):
# def write_dict_json(arr_data, json_writer):
# def close_json_writer(json_writer):
# def get_architecture():
# def get_winpmem_name():
# def create_driver_service(logger):
# def start_service(h_svc, logger):
# def stop_and_delete_driver_service(h_svc):
# def process_size(size_str):
# def record_sha256_logs(fr, fw):
# def process_hashes(path):
# def process_md5(path):
# def process_sha1(path):
# def process_sha256(path):
# def rot13(s):
# def get_os_version():
# def change_char_set_os_environ(environ):


from statemachine import _Statemachine
from settings import NETWORK_ADAPTATER
from utils import utils
import subprocess

            IPv6 = ''
            DHCP_server = ''
            DNS_server = ''
            adapter_type = ''
            nbtstat_value = ''
            if n.AdapterTypeID:
                adapter_type = NETWORK_ADAPTATER[int(n.AdapterTypeID)]
            netconnectionstatus = n.NetConnectionStatus
            mac_address = n.MACAddress
            description = n.Description
            physical_adapter = ''
            product_name = ''
            database_path = ''
            speed = ''
            if n.Speed:
                speed = n.Speed
            if netconnectionstatus:
                nic = self.wmi.Win32_NetworkAdapterConfiguration(MACAddress=mac_address)
                for nc in nic:
                    if nc:
                        if nc.DatabasePath:
                            database_path = nc.DatabasePath
                            database_path = database_path.replace('\n', '')
                        if nc.IPAddress:
                            IPv4 = nc.IPAddress[0]
                            if len(nc.IPaddress) > 1:
                                IPv6 = nc.IPAddress[1]
                            nbtstat = 'nbtstat -A ' + IPv4
                            p = subprocess.Popen(nbtstat, shell=True, stdout=subprocess.PIPE)
                            output, errors = p.communicate()

# Path: settings.py
# NETWORK_ADAPTATER = {
#     0: "Ethernet 802.3",
#     1: "Token Ring 802.5",
#     2: "Fiber Distributed Data Interface (FDDI)",
#     3: "Wide Area Network (WAN)",
#     4: "LocalTalk",
#     5: "Ethernet using DIX header format",
#     6: "ARCNET",
#     7: "ARCNET (878.2)",
#     8: "ATM",
#     9: "Wireless",
#     10: "Infrared Wireless",
#     11: "Bpc",
#     13: "CoWan",
#     14: "1394",
#     15: "Tunnel"
# }
# 
# Path: utils/utils.py
# class UnicodeJsonDumper:
# class UnicodeWriter:
# class OSVERSIONINFOEXW(ctypes.Structure):
#     def __init__(self, output):
#     def list_to_json(self, list_json):
#     def dump_json(self, entry):
#     def close_current(self):
#     def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds):
#     def writerow(self, row):
#     def writerows(self, rows):
# def find_encoding(value):
# def encode_json_dict(jdict):
# def decode_output_cmd(output):
# def mount_share(share_path, param_username, param_password):
# def unmount_share(letter):
# def change_to_MKTime(seconds):
# def convert_windate(timestamp):
# def dosdate(_dosdate, _dostime):
# def convert_string_to_hex(string):
# def get_local_drives():
# def get_removable_drives():
# def sid2username(sid):
# def str_sid2username(str_sid):
# def check_outlook_d(path):
# def look_for_outlook_dirs(paths_to_search):
# def look_for_files(dir_to_look):
# def zip_from_object(files_to_zip, zip_object, logger):
# def zip_archive(files_to_zip, zip_path, filename, logger, file_mode="w"):
# def clean(path, computer_name):
# def is_locked(filename):
# def is_open(filename):
# def is_allowed(filename):
# def is_running(name):
# def copy_file(root, path, dest):
# def check_permissions(path, logger):
# def write_to_output(str_to_write, output, logger):
# def get_terminal_decoded_string(string):
# def get_json_writer(json_file):
# def get_csv_writer(csvfile):
# def write_to_csv(arr_data, csv_writer):
# def write_list_to_csv(arr_data, csv_writer):
# def write_list_to_json(arr_data, json_writer):
# def write_to_json(header, arr_data, json_writer):
# def write_dict_json(arr_data, json_writer):
# def close_json_writer(json_writer):
# def get_architecture():
# def get_winpmem_name():
# def create_driver_service(logger):
# def start_service(h_svc, logger):
# def stop_and_delete_driver_service(h_svc):
# def process_size(size_str):
# def record_sha256_logs(fr, fw):
# def process_hashes(path):
# def process_md5(path):
# def process_sha1(path):
# def process_sha256(path):
# def rot13(s):
# def get_os_version():
# def change_char_set_os_environ(environ):


# Path: health/windowsXPStateMachine.py
from statemachine import _Statemachine
from settings import NETWORK_ADAPTATER
from utils import utils
import subprocess

            IPv6 = ''
            DHCP_server = ''
            DNS_server = ''
            adapter_type = ''
            nbtstat_value = ''
            if n.AdapterTypeID:
                adapter_type = NETWORK_ADAPTATER[int(n.AdapterTypeID)]
            netconnectionstatus = n.NetConnectionStatus
            mac_address = n.MACAddress
            description = n.Description
            physical_adapter = ''
            product_name = ''
            database_path = ''
            speed = ''
            if n.Speed:
                speed = n.Speed
            if netconnectionstatus:
                nic = self.wmi.Win32_NetworkAdapterConfiguration(MACAddress=mac_address)
                for nc in nic:
                    if nc:
                        if nc.DatabasePath:
                            database_path = nc.DatabasePath
                            database_path = database_path.replace('\n', '')
                        if nc.IPAddress:
                            IPv4 = nc.IPAddress[0]
                            if len(nc.IPaddress) > 1:
                                IPv6 = nc.IPAddress[1]
                            nbtstat = 'nbtstat -A ' + IPv4
                            p = subprocess.Popen(nbtstat, shell=True, stdout=subprocess.PIPE)
                            output, errors = p.communicate()

                            output = utils.decode_output_cmd(output)
