
    #f
                         d dl Z d dlmZmZmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ  e j        e          Z G d dej        j                  ZdS )	    N)
interfaces	renderers
exceptions)requirements)format_hints)linux)lsmodc                   8    e Zd ZdZdZed             Zd Zd ZdS )Keyboard_notifiersz'Parses the keyboard notifier call chain   r   r   c                     t          j        ddg d          t          j        dt          j        d          t          j        dt          j        d	          gS )
NkernelzLinux kernel)Intel32Intel64AArch64)namedescriptionarchitecturesr	   r   )r   pluginversion
linuxutils)r   	componentr   )r   ModuleRequirementPluginRequirementr	   LsmodVersionRequirementr   LinuxUtilities)clss    h/home/panchajanya/Development/work/volatility3/volatility3/framework/plugins/linux/keyboard_notifiers.pyget_requirementsz#Keyboard_notifiers.get_requirements   ss     **???  
 *U[)   +!U-A9  
 	
    c              #     K   | j         j        | j        d                  }t          j                            | j         |j                  }t          j        	                    | j         |j        |          }	 |
                    d          }n# t          j        $ r d }Y nw xY w|st          d          |                    d|j        j        d          }t          j                            |dd|j                  D ]H}|j        }t          j                            |||          \  }}	d	t+          j        |          ||	gfV  Id S )
Nr   keyboard_notifier_listzThis plugin requires the keyboard_notifier_list structure. This structure is not present in the supplied symbol table. This means you are either analyzing an unsupported kernel version or that your symbol table is corrupt.atomic_notifier_headT)object_typeoffsetabsolutenotifier_blocknextr   )contextmodulesconfigr	   r   list_modulesr   r   r   generate_kernel_handler_infoobject_from_symbolr   SymbolError	TypeErrorobjectvolr'   walk_internal_listheadnotifier_calllookup_module_addressr   Hex)
selfvmlinuxr,   handlersknl_addrknl	call_back	call_addrmodule_namesymbol_names
             r    
_generatorzKeyboard_notifiers._generator%   sz     ,&t{8'<=+**4<FF'DDL',
 
	112JKKHH% 	 	 	HHH	  	z   nn.<&  
 
 -@@%vsx
 
 		O 		OI "/I',';'Q'Q9( ($K |'	22KMNNNNN		O 		Os   6B B B c                     t          j        dt          j        fdt          fdt          fg|                                           S )NAddressModuleSymbol)r   TreeGridr   r9   strrC   )r:   s    r    runzKeyboard_notifiers.runK   s>    !)*XsOh_MOO
 
 	
r"   N)	__name__
__module____qualname____doc___required_framework_versionclassmethodr!   rC   rJ    r"   r    r   r      s[        11"+
 
 [
$O $O $OL
 
 
 
 
r"   r   )loggingvolatility3.frameworkr   r   r   #volatility3.framework.configurationr   volatility3.framework.renderersr   volatility3.framework.symbolsr   volatility3.plugins.linuxr	   	getLoggerrK   vollogpluginsPluginInterfacer   rQ   r"   r    <module>r\      s   
  C C C C C C C C C C < < < < < < 8 8 8 8 8 8 / / / / / / + + + + + +		8	$	$?
 ?
 ?
 ?
 ?
+; ?
 ?
 ?
 ?
 ?
r"   