threatbus/src/connector.py
def _process_message(self, sse_msg: Event):
        """
        Invoked for every incoming SSE message from the OpenCTI endpoint
        @param sse_msg: the received SSE Event
        """
        try:
            data: dict = json.loads(sse_msg.data).get("data", None)
            if not data:
                return
            indicator = self._map_to_threatbus(data, sse_msg.event)
            if not indicator:
                return
            self._send_to_threatbus(indicator)

        except Exception as e:
            self.helper.log_error(f"Error forwarding indicator to Threat Bus: {e}")

        Invoked for every incoming SSE message from the OpenCTI endpoint
        @param sse_msg: the received SSE Event
        
Invoked for every incoming SSE message from the OpenCTI endpoint
Invoked for every incoming SSE message from the OpenCTI endpoint
def _process_message(self, sse_msg: Event):
        try:
            data: dict = json.loads(sse_msg.data).get("data", None)
            if not data:
                return
            indicator = self._map_to_threatbus(data, sse_msg.event)
            if not indicator:
                return
            self._send_to_threatbus(indicator)
        except Exception as e:
            self.helper.log_error(f"Error forwarding indicator to Threat Bus: {e}")
def _process_message ( self , sse_msg : Event ) : try : data : dict = json . loads ( sse_msg . data ) . get ( "data" , None ) if not data : return indicator = self . _map_to_threatbus ( data , sse_msg . event ) if not indicator : return self . _send_to_threatbus ( indicator ) except Exception as e : self . helper . log_error ( f"Error forwarding indicator to Threat Bus: {e}" )
Invoked for every incoming SSE message from the OpenCTI endpoint
Invoked for every incoming SSE message from the OpenCTI endpoint
"""
        Invoked for every incoming SSE message from the OpenCTI endpoint
        @param sse_msg: the received SSE Event
        """
self
sse_msg
Event
the received SSE Event
the received SSE Event