def study(self, etree_node, entries=None, lines=None, parent=None):
    for identifier in self.payloads['identifiers']['{0}'.format((parent if ((parent is not None) and (parent in self.payloads['identifiers'])) else 'others'))]:
        tmp_id = identifier.split('->')
        (report, identifier) = ((tmp_id[0], tmp_id[1]) if (len(tmp_id) == 2) else (None, tmp_id[0]))
        found_node = etree_node.xpath("//*[@*[re:test(., '{0}', 'i')] or @*[re:test(name(.), '{0}', 'i')] or re:test(local-name(),'{0}', 'i') or text()[re:test(., '{0}', 'i')]]".format(identifier), namespaces={'re': 'http://exslt.org/regular-expressions'})
        if ((found_node is not None) and (len(found_node) != 0)):
            for node in found_node:
                if (identifier in node.tag):
                    if self.verbose:
                        self.logY('Found in tag name {0}'.format(node.tag))
                    d = {'type': 'tag', 'value': node.tag, 'lineno': node.text.strip(), 'identifier': identifier, 'report': report}
                    if (d not in entries):
                        if self.verbose:
                            self.logY('\t{0}'.format(d))
                        entries.append(d)
                elif ((node.text is not None) and (identifier in node.text)):
                    if self.verbose:
                        self.logY('Found in text, tag {0}'.format(node.tag))
                    d = {'type': 'text', 'parent': node.tag, 'lineno': (node.getprevious().text.strip() if (node.getprevious() is not None) else node.getparent().getprevious().text.strip()), 'identifier': identifier, 'report': report}
                    if (d not in entries):
                        if self.verbose:
                            self.logY('\t{0}'.format(d))
                        entries.append(d)
                for (k, v) in node.attrib.iteritems():
                    if (identifier in v):
                        if self.verbose:
                            self.logY('Found in attribute value {0} of tag {1}'.format(k, node.tag))
                        d = {'type': 'attrval', 'name': k, 'tag': node.tag, 'lineno': node.getprevious().text.strip(), 'identifier': identifier, 'report': report}
                        if (d not in entries):
                            if self.verbose:
                                self.logY('\t{0}'.format(d))
                            entries.append(d)
                    if (identifier in k):
                        if self.verbose:
                            self.logY('Found in attribute name {0} of tag {1}'.format(k, node.tag))
                        d = {'type': 'attrname', 'name': k, 'tag': node.tag, 'lineno': node.getprevious().text.strip(), 'identifier': identifier, 'report': report}
                        if (d not in entries):
                            if self.verbose:
                                self.logY('\t{0}'.format(d))
                            entries.append(d)
        found_node = etree_node.xpath("//comment()[re:test(., '{0}', 'i')]".format(identifier), namespaces={'re': 'http://exslt.org/regular-expressions'})
        if ((found_node is not None) and (len(found_node) != 0)):
            for node in found_node:
                if self.verbose:
                    self.logY('Found in comment, content: "{0}"'.format(node))
                d = {'type': 'comment', 'lineno': (node.getparent().getprevious().text.strip() if (node.getprevious() is None) else node.getprevious().text.strip()), 'identifier': identifier, 'report': report}
                if (d not in entries):
                    if self.verbose:
                        self.logY('\t{0}'.format(d))
                    entries.append(d)
def study(self, etree_node, entries=None, lines=None, parent=None):
    for identifier in self.payloads['identifiers']['{0}'.format((parent if ((parent is not None) and (parent in self.payloads['identifiers'])) else 'others'))]:
        tmp_id = identifier.split('->')
        (report, identifier) = ((tmp_id[0], tmp_id[1]) if (len(tmp_id) == 2) else (None, tmp_id[0]))
        found_node = etree_node.xpath("//*[@*[re:test(., '{0}', 'i')] or @*[re:test(name(.), '{0}', 'i')] or re:test(local-name(),'{0}', 'i') or text()[re:test(., '{0}', 'i')]]".format(identifier), namespaces={'re': 'http://exslt.org/regular-expressions'})
        if ((found_node is not None) and (len(found_node) != 0)):
            for node in found_node:
                if (identifier in node.tag):
                    if self.verbose:
                        self.logY('Found in tag name {0}'.format(node.tag))
                    d = {'type': 'tag', 'value': node.tag, 'lineno': node.text.strip(), 'identifier': identifier, 'report': report}
                    if (d not in entries):
                        if self.verbose:
                            self.logY('\t{0}'.format(d))
                        entries.append(d)
                elif ((node.text is not None) and (identifier in node.text)):
                    if self.verbose:
                        self.logY('Found in text, tag {0}'.format(node.tag))
                    d = {'type': 'text', 'parent': node.tag, 'lineno': (node.getprevious().text.strip() if (node.getprevious() is not None) else node.getparent().getprevious().text.strip()), 'identifier': identifier, 'report': report}
                    if (d not in entries):
                        if self.verbose:
                            self.logY('\t{0}'.format(d))
                        entries.append(d)
                for (k, v) in node.attrib.iteritems():
                    if (identifier in v):
                        if self.verbose:
                            self.logY('Found in attribute value {0} of tag {1}'.format(k, node.tag))
                        d = {'type': 'attrval', 'name': k, 'tag': node.tag, 'lineno': node.getprevious().text.strip(), 'identifier': identifier, 'report': report}
                        if (d not in entries):
                            if self.verbose:
                                self.logY('\t{0}'.format(d))
                            entries.append(d)
                    if (identifier in k):
                        if self.verbose:
                            self.logY('Found in attribute name {0} of tag {1}'.format(k, node.tag))
                        d = {'type': 'attrname', 'name': k, 'tag': node.tag, 'lineno': node.getprevious().text.strip(), 'identifier': identifier, 'report': report}
                        if (d not in entries):
                            if self.verbose:
                                self.logY('\t{0}'.format(d))
                            entries.append(d)
        found_node = etree_node.xpath("//comment()[re:test(., '{0}', 'i')]".format(identifier), namespaces={'re': 'http://exslt.org/regular-expressions'})
        if ((found_node is not None) and (len(found_node) != 0)):
            for node in found_node:
                if self.verbose:
                    self.logY('Found in comment, content: "{0}"'.format(node))
                d = {'type': 'comment', 'lineno': (node.getparent().getprevious().text.strip() if (node.getprevious() is None) else node.getprevious().text.strip()), 'identifier': identifier, 'report': report}
                if (d not in entries):
                    if self.verbose:
                        self.logY('\t{0}'.format(d))
                    entries.append(d)