find_known_secrets/searcher.py
def append_known_secrets(self):  # type: () -> None
        """
        Read key-value pair files with secrets. For example, .conf and .ini files.
        :return:
        """
        for file_name in self.files:
            if "~" in file_name:
                file_name = os.path.expanduser(file_name)
            if not os.path.isfile(file_name):
                print(
                    "Don't have "
                    + Back.BLACK
                    + Fore.YELLOW
                    + file_name
                    + ", won't use."
                )
                continue
            with open(os.path.expanduser(file_name), "r") as file:
                for line in file:
                    if line and "=" in line:
                        possible = line.split("=")[1].strip(" \"'\n")
                        if len(possible) > 4 and possible not in self.false_positives:
                            self.secrets.append(possible)
def append_known_secrets(self):  # type: () -> None
        """
        Read key-value pair files with secrets. For example, .conf and .ini files.
        :return:
        """
        for file_name in self.files:
            if "~" in file_name:
                file_name = os.path.expanduser(file_name)
            if not os.path.isfile(file_name):
                print(
                    "Don't have "
                    + Back.BLACK
                    + Fore.YELLOW
                    + file_name
                    + ", won't use."
                )
                continue
            with open(os.path.expanduser(file_name), "r") as file:
                for line in file:
                    if line and "=" in line:
                        possible = line.split("=")[1].strip(" \"'\n")
                        if len(possible) > 4 and possible not in self.false_positives:
                            self.secrets.append(possible)
Read key-value pair files with secrets. For example, .conf and .ini files.
        :return: