import re


def find_knock_params(args, knock_param_list):
    """Matches knock params to a list of arguments.

    Args:
        args: iterable of strings to check
        knock_param_list: iterable of (string, {string: ?}) where
            the first string being a regular expression, the remaining
            dict is used for knocking as kwargs

    Returs:
        Parameters for knocking.
    """
    for arg in args:
        for regex, knock_params in knock_param_list:
            if re.search(regex, arg):
                return knock_params
    return None