lookyloo/lookyloo.py
def categories_capture(self, capture_uuid: str, /) -> Dict[str, Any]:
        '''Get all the categories related to a capture, in MISP Taxonomies format'''
        capture_dir = self._get_capture_dir(capture_uuid)
        # get existing categories if possible
        if (capture_dir / 'categories').exists():
            with (capture_dir / 'categories').open() as f:
                current_categories = [line.strip() for line in f.readlines()]
            return {e: self.taxonomies.revert_machinetag(e) for e in current_categories}
        return {}
Get all the categories related to a capture, in MISP Taxonomies format
Get all the categories related to a capture, in MISP Taxonomies format
Get all the categories related to a capture in MISP Taxonomies format
def categories_capture(self, capture_uuid: str, /) -> Dict[str, Any]:
        capture_dir = self._get_capture_dir(capture_uuid)
        if (capture_dir / 'categories').exists():
            with (capture_dir / 'categories').open() as f:
                current_categories = [line.strip() for line in f.readlines()]
            return {e: self.taxonomies.revert_machinetag(e) for e in current_categories}
        return {}
def categories_capture ( self , capture_uuid : str , / ) -> Dict [ str , Any ] : capture_dir = self . _get_capture_dir ( capture_uuid ) if ( capture_dir / 'categories' ) . exists ( ) : with ( capture_dir / 'categories' ) . open ( ) as f : current_categories = [ line . strip ( ) for line in f . readlines ( ) ] return { e : self . taxonomies . revert_machinetag ( e ) for e in current_categories } return { }
Get all the categories related to a capture, in MISP Taxonomies format
Get all the categories related to a capture in MISP Taxonomies format
'''Get all the categories related to a capture, in MISP Taxonomies format''' # get existing categories if possible
self
capture_uuid
str