How to use the h8mail.utils.helpers.get_config_from_file function in h8mail

To help you get started, we’ve selected a few h8mail examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github khast3x / h8mail / h8mail / utils / View on Github external
def target_factory(targets, user_args):
    Receives list of emails and user args. Fetchs API keys from config file using user_args path and cli keys.
    For each target, launch target.methods() associated to found config artifacts.
    Handles the chase logic with counters from enumerate()
    finished = []
    if user_args.config_file is not None or user_args.cli_apikeys is not None:
        api_keys = get_config_from_file(user_args)
        api_keys = None
    init_targets_len = len(targets)

    query = "email"
    skip_default_queries = False
    if user_args.user_query is not None:
        query = user_args.user_query
        skip_default_queries = False
    scylla_up = False
    for counter, t in enumerate(targets):
        c.info_news("Target factory started for {target}".format(target=t))
        if user_args.debug:
            current_target = target(t, debug=True)