U
    @†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   s4   || _ |  ¡ | _t| ¡ ƒD ]}|| | j|< q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 d| d | ¡ || jkr8d S d| j|< | jd D ]2}d| ¡  | ¡ krLtd|| j	|ƒ}|  
|¡ qLd 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   