#!/usr/bin/env python
# -*- coding: utf-8 -*-
# apsniff Helpers
#
# Author: Sergio Salazar (ssalazarcz@gmail.com)
#

__version__ = "0.1"
__last_updated__ = "March 15, 2018"
__author__ = "Sergio Salazar"

# Imports
import os

class Loader:
    def loadAPConfigFiles(self, path_to_scan):
        _ap_config_files = []
        for root, subdirs, files in os.walk(os.path.normpath(path_to_scan)):
            for subdir in subdirs:
                pass
            for filename in files:
                file_path = os.path.join(root, filename)

                if file_path.lower().endswith('.ini'):
                    _ap_config_files.append(file_path)

        return _ap_config_files

class  Reporter:
    def writeHTMLReport(self, file_name, header, summary, footer):
        file = open(file_name, 'w', encoding='latin-1')
        file.write(header)
        for issue in summary:
            file.write(issue)
        file.write(footer)
        file.close()
