(self, indicator_type)
Populates the intel attribute with entities from Yeti.
Populates the intel attribute with entities from Yeti.
Populates the intel attribute with entities from Yeti .
def get_indicators(self, indicator_type):
        """Populates the intel attribute with entities from Yeti."""
        results = requests.post(
            self.yeti_api_root + '/indicators/filter/',
            json={'name': '', 'type': indicator_type},
            headers={'X-Yeti-API': self.yeti_api_key},
        )
        if results.status_code != 200:
            return
        self.intel = {item['id']: item for item in results.json()}
        for item in results.json():
            item['compiled_regexp'] = re.compile(item['pattern'])
            self.intel[item['id']] = item
def get_indicators ( self , indicator_type ) : results = requests . post ( self . yeti_api_root + '/indicators/filter/' , json = { 'name' : '' , 'type' : indicator_type } , headers = { 'X-Yeti-API' : self . yeti_api_key } , ) if results . status_code != 200 : return self . intel = { item [ 'id' ] : item for item in results . json ( ) } for item in results . json ( ) : item [ 'compiled_regexp' ] = re . compile ( item [ 'pattern' ] ) self . intel [ item [ 'id' ] ] = item