def _passive_handler(store, **kwargs):
    """ Decorator for setting up a passive handler.

    Passive handlers should make no modifications or do any potentially destructive operations on
    connections, they should simply do passive detection of issues.

    NOTE: We currently do not do strict enforcement that passive handlers don't do anything active
    to the connection, we do wrap the standard data handling methods to ignore the return values
    but that is more for convenience than anything else.

    Arguments:
    All arguments are passed to handler(), see handler for argument descriptions.
    """
    def wrapper(cls):
        # Wrap all the traffic methods to ignore the return values from the
        # passive handler
        funcs = ["on_request", "on_inject_request", "on_response",
                 "on_inject_response"]
        for func in funcs:
            f = _passive_handler_func(getattr(cls, func))
            setattr(cls, func, f)
        # Call into the normal wrapper to set cls.passive and add it to the
        # store.
        return handler(store, passive=True, **kwargs)(cls)
    return wrapper
 Decorator for setting up a passive handler.

    Passive handlers should make no modifications or do any potentially destructive operations on
    connections, they should simply do passive detection of issues.

    NOTE: We currently do not do strict enforcement that passive handlers don't do anything active
    to the connection, we do wrap the standard data handling methods to ignore the return values
    but that is more for convenience than anything else.

    Arguments:
    All arguments are passed to handler(), see handler for argument descriptions.
    
nogotofail/mitm/connection/handlers/store.py