'Plugin entry point, search for the code disclosures.
Unit tests are available at plugins/grep/tests.
:param request: The HTTP request object.
:param response: The HTTP response object
:return: None'

def grep(self, request, response):

    if (not response.is_text_or_html()):
        return
    (match, lang) = contains_source_code(response)
    if (not match):
        return
    if (is_404(response) and self._report_404_match):
        self._report_404_match = False
        desc = u'The    URL:    "%s"    has    a    %s    code    disclosure    vulnerability    in    the    customized    404    script.'
        name = u'Code    disclosure    vulnerability    in    404    page'
    else:
        desc = u'The    URL:    "%s"    has    a    %s    code    disclosure    vulnerability.'
        name = u'Code    disclosure    vulnerability'
    desc %= (response.get_url(), '    or    '.join(list(lang)))
    v = Vuln(name, desc, severity.LOW, response.id, self.get_name())
    v.set_url(response.get_url())
    v.add_to_highlight(match.group())
    self.kb_append_uniq(self, 'code_disclosure', v, 'URL')
