Exemple #1
0
 def __init__(self ):
     '''
     Init some variables and files.
     Create the URI opener.
     '''
     # Create some directories
     self._home_directory()
     self._tmp_directory()
     
     # These are some of the most important moving parts in the w3afCore
     # they basically handle every aspect of the w3af framework:
     self.strategy = w3af_core_strategy( self )
     self.profiles = w3af_core_profiles( self )
     self.plugins = w3af_core_plugins( self )
     self.status = w3af_core_status()
     self.target = w3af_core_target()
     self.progress = progress()
     
     # Init some internal variables
     self._initializeInternalVariables()
     self.plugins.zero_enabled_plugins()
     
     # I init the 404 detection for the whole framework
     self.uriOpener = xUrllib()
     fp_404_db = fingerprint_404_singleton()
     fp_404_db.set_urlopener( self.uriOpener )
Exemple #2
0
    def getTarget( self ):
        '''
        @return: The profile target with the options (targetOS, targetFramework, etc.)
        '''
        # Get the plugin defaults with their types
        targetInstance = w3af_core_target()
        options = targetInstance.getOptions()

        for section in self._config.sections():
            # Section is something like audit.xss or discovery.webSpider
            # or [profile] or [target]
            if section == 'target':
                for option in self._config.options(section):
                    options[option].setValue( self._config.get(section, option) )
        
        return options