3
@†6^o  ã               @   s(   d dl mZmZmZ G dd„ deƒZdS )é    )Ú
SpiderFootÚSpiderFootPluginÚSpiderFootEventc            	   @   sZ   e Zd ZdZdddddddd	d
giZddiZdZeƒ fdd„Zdd„ Z	dd„ Z
dd„ ZdS )Úsfp_intfilesz„Interesting Files:Footprint,Passive:Crawling and Scanning::Identifies potential files of interest, e.g. office documents, zip files.ÚfileextsÚdocÚdocxÚpptÚpptxÚpdfÚxlsÚxlsxÚzipz2File extensions of files you consider interesting.Nc             C   s8   || _ | jƒ | _x"t|jƒ ƒD ]}|| | j|< qW d S )N)ÚsfÚtempStorageÚresultsÚlistÚkeysÚopts)ÚselfÚsfcÚuserOptsÚopt© r   ú7/var/www/spiderfoot.crq.systems/modules/sfp_intfiles.pyÚsetup   s    
zsfp_intfiles.setupc             C   s   dgS )NÚLINKED_URL_INTERNALr   )r   r   r   r   ÚwatchedEvents'   s    zsfp_intfiles.watchedEventsc             C   s   dgS )NÚINTERESTING_FILEr   )r   r   r   r   ÚproducedEvents-   s    zsfp_intfiles.producedEventsc             C   sˆ   |j }|j}|j}| jjd| d | ƒ || jkr8d S d| j|< x@| jd D ]2}d|jƒ  |jƒ krNtd|| j	|ƒ}| j
|ƒ qNW d S )NzReceived event, z, from Tr   Ú.r   )Ú	eventTypeÚmoduleÚdatar   Údebugr   r   Úlowerr   Ú__name__ÚnotifyListeners)r   ÚeventÚ	eventNameÚsrcModuleNameÚ	eventDataÚfileExtÚevtr   r   r   ÚhandleEvent1   s    


zsfp_intfiles.handleEvent)r&   Ú
__module__Ú__qualname__Ú__doc__r   Úoptdescsr   Údictr   r   r   r.   r   r   r   r   r      s   r   N)Úsflibr   r   r   r   r   r   r   r   Ú<module>   s   