'Plugin entry point.
:param request: The HTTP request object.
:param response: The HTTP response object
:return: None, all results are saved in the kb.'

def grep(self, request, response):

    if ((response.get_code() != 501) and response.is_text_or_html()):
        body_without_tags = response.get_clear_text_body()
        if (body_without_tags is None):
            return
        uri = response.get_uri()
        for (match, _, _, reqres) in self._multi_re.query(body_without_tags):
            if (reqres == 'REQUEST'):
                desc = 'An    HTTP    request    was    found    in    the    HTTP    body    of    a    response.'
                i = Info('HTTP    Request    in    HTTP    body', desc, response.id, self.get_name())
                i.set_uri(uri)
                i.add_to_highlight(match.group(0))
                kb.kb.append(self, 'request', i)
            if (reqres == 'RESPONSE'):
                desc = 'An    HTTP    response    was    found    in    the    HTTP    body    of    a    response.'
                i = Info('HTTP    Response    in    HTTP    body', desc, response.id, self.get_name())
                i.set_uri(uri)
                i.add_to_highlight(match.group(0))
                kb.kb.append(self, 'response', i)
