def _loadQueries():
 def iterate(node, retVal=None):
  class DictObject(object, ):
   def __init__(self):
    self.__dict__ = {}
   def __contains__(self, name):
    return (name in self.__dict__)
  if (retVal is None):
   retVal = DictObject()
  for child in node.findall('*'):
   instance = DictObject()
   retVal.__dict__[child.tag] = instance
   if child.attrib:
    instance.__dict__.update(child.attrib)
   else:
    iterate(child, instance)
  return retVal
 tree = ElementTree()
 try:
  tree.parse(paths.QUERIES_XML)
 except Exception as ex:
  errMsg = 'something appears to be wrong with '
  errMsg += ("the file '%s' ('%s'). Please make " % (paths.QUERIES_XML, getSafeExString(ex)))
  errMsg += "sure that you haven't made any changes to it"
  raise SqlmapInstallationException, errMsg
 for node in tree.findall('*'):
  queries[node.attrib['value']] = iterate(node)

def _loadQueries ( ) : def iterate ( node , retVal = None ) : class DictObject ( object , ) : def __init__ ( self ) : self . __dict__ = { } def __contains__ ( self , name ) : return ( name in self . __dict__ ) if ( retVal is None ) : retVal = DictObject ( ) for child in node . findall ( '*' ) : instance = DictObject ( ) retVal . __dict__ [ child . tag ] = instance if child . attrib : instance . __dict__ . update ( child . attrib ) else : iterate ( child , instance ) return retVal tree = ElementTree ( ) try : tree . parse ( paths . QUERIES_XML ) except Exception as ex : errMsg = 'something appears to be wrong with ' errMsg += ( "the file '%s' ('%s'). Please make " % ( paths . QUERIES_XML , getSafeExString ( ex ) ) ) errMsg += "sure that you haven't made any changes to it" raise SqlmapInstallationException , errMsg for node in tree . findall ( '*' ) : queries [ node . attrib [ 'value' ] ] = iterate ( node )
loads queries from xml/queries .