Skip to content

Commit

Permalink
informing platform in taxonomy.predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
brunotoresan-axur committed Aug 15, 2023
1 parent fbb7bc6 commit fc82b20
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion analyzers/Axur/axur_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ def summary(self, raw):

for data in raw['results']:
level = levels[data.get('score', 0)]
predicate = createPredicateFrom(data)
taxonomies.append(
self.build_taxonomy(level, 'Axur', data['source'], data.get('hits', 0))
self.build_taxonomy(level, 'Axur', predicate, data.get('hits', 0))
)

return {'taxonomies': taxonomies}

def createPredicateFrom(data):
if len(data['context']) > 0 and 'platform' in data['context'][0].keys():
return data['source'] + ":" + data['context']['platform']
else:
return data['source']

if __name__ == '__main__':
AxurAnalyzer().run()

0 comments on commit fc82b20

Please sign in to comment.