
    Xf	                        d Z ddlZddlmZmZ ddlmZmZmZm	Z	  ej
        e          Zdej        j        deej        j                 deej        j                 ded	e	j        d
eej        j                 dej        j        fdZdS )z|All core generic plugins.

These modules should only be imported from volatility3.plugins NOT
volatility3.framework.plugins
    N)ListType)
interfaces	automagic
exceptions	constantscontext
automagicspluginbase_config_pathprogress_callbackopen_methodreturnc           	      X   t          j        || |||          }t          j                            ||j                  }|                    | |          }|r|D ]}	d |	                                D             d         }
t          	                    d|
dd                     t          
                    t          j        d                    |	                    d                               t          j        |           || ||          }|r|                    |           |S )	a~  Constructs a plugin object based on the parameters.

    Clever magic figures out how to fulfill each requirement that might not be fulfilled

    Args:
        context: The volatility context to operate on
        automagics: A list of automagic modules to run to augment the context
        plugin: The plugin to run
        base_config_path: The path within the context's config containing the plugin's configuration
        progress_callback: Callback function to provide feedback for ongoing processes
        open_method: class to provide context manager for opening the file

    Returns:
        The constructed plugin object
    )r   c                     g | ]}|S  r   ).0xs     X/home/panchajanya/Development/work/volatility3/volatility3/framework/plugins/__init__.py
<listcomp>z$construct_plugin.<locals>.<listcomp>9   s    EEE!AEEE    zAutomagic exception occurred: N T)chain)r   runr   configuration	path_join__name__unsatisfiedformat_exception_onlyvollogwarninglogr   
LOGLEVEL_Vjoinformatr   UnsatisfiedExceptionset_open_method)r	   r
   r   r   r   r   errorsplugin_config_pathr   errorerror_stringconstructeds               r   construct_pluginr.      sL   . ]+  F $1;;&/ 
 $$W.@AAK ; 	P 	PEEEu'B'B'D'DEEEbILNNOL"<MOOPPPJJy+RWWU\\\5M5M-N-NOOOO-k:::&#7H  K  1##K000r   )__doc__loggingtypingr   r   volatility3.frameworkr   r   r   r   	getLoggerr   r!   r	   ContextInterfaceAutomagicInterfacepluginsPluginInterfacestrProgressCallbackFileHandlerInterfacer.   r   r   r   <module>r;      s              N N N N N N N N N N N N		8	$	$101Z)<=1 #341 	1
 !11 j(=>1 '1 1 1 1 1 1r   