Example #1
0
def sql_check():
    files = get_files()
    if not files:
        Utils.printy("No SQL files found ", 2)
        return
    retrieved_files = Utils.get_dataprotection(files)
    data.local_file_protection.extend(retrieved_files)
    check = Checker(files, 'SQL')
    check.start()
    Utils.printy_result('Database Check.', 1)
    return check.results
Example #2
0
    def check(self):
        files = self.get_files()
        if not files:
            Utils.printy("No Plist files found ", 2)
            return

        # Add data protection class
        retrieved_files = Utils.get_dataprotection(files)
        data.local_file_protection.extend(retrieved_files)

        # start check plist sensitive data
        check = Checker(files, 'PLIST')
        check.start()
        data.plist_file_results = check.results
        Utils.printy_result('Plist Check.', 1)
Example #3
0
    def get(self):
        # Compose cmd string
        dirs = [data.metadata['bundle_directory'], data.metadata['data_directory']]
        dirs_str = ' '.join(dirs)
        cmd = '{bin} {dirs_str} -type f -name "*sql*"'.format(bin=data.DEVICE_TOOLS['FIND'], dirs_str=dirs_str)
        out = Utils.cmd_block(self.client, cmd).split("\n")

        # No files found
        if not out:
            print("No SQL files found")
            return

        # Add data protection class
        retrieved_files = Utils.get_dataprotection(out)

        for file_lable in retrieved_files:
            print file_lable[0], "protection:", file_lable[1]