Esempio n. 1
0
 def __str__(self):
     """
     Return a str representation of this fuzzable request.
     """
     res = '[[XMLRPC]] '
     res += self._url
     res += ' | Method: ' + self._method
     res += ' | XMLRPC: ('
     res += ','.join([i[1] for i in parse_xmlrpc(self._xml).all_parameters])
     res += ')'
     return res
Esempio n. 2
0
    def parse_xml_data(self, xml_post_data):
        """
        Parses the XML post data and stores all the information required to
        fuzz the XML data as attributes.

        :param xml_post_data: The XMLRPC call as string
        :raises: ValueError if the xml_post_data is not valid XML or XML-RPC
        """
        try:
            read_handler = parse_xmlrpc(xml_post_data)
        except:
            raise ValueError(ERR_MSG % xml_post_data[:50])
        else:
            # Tried to do this with self.update but it was failing :S
            for k, v in read_handler.get_data_container().items():
                self[k] = v