(self, obj)
Perform a malware lookup on the query value.
Perform a malware lookup on the query value.
Perform a malware lookup on the query value .
def do_malware_query(self, obj):
        """Perform a malware lookup on the query value."""
        client = self._generate_request_instance('enrichment')
        query = self._get_query_type(obj)
        results = client.get_malware(query=query)
        self._check_response(results)
        for record in results.get('results', []):
            stats = {'Source': record.get('source'),
                     'URL': record.get('sourceUrl'),
                     'Collected': record.get('collectionDate')}
            self._add_result('Malware', record.get('sample'), stats)
def do_malware_query ( self , obj ) : client = self . _generate_request_instance ( 'enrichment' ) query = self . _get_query_type ( obj ) results = client . get_malware ( query = query ) self . _check_response ( results ) for record in results . get ( 'results' , [ ] ) : stats = { 'Source' : record . get ( 'source' ) , 'URL' : record . get ( 'sourceUrl' ) , 'Collected' : record . get ( 'collectionDate' ) } self . _add_result ( 'Malware' , record . get ( 'sample' ) , stats )