Merge branch 'master' of github.com:MISP/misp-modules

pull/222/head
chrisr3d 2018-09-02 20:21:01 +02:00
commit bc2a73c5cf
1 changed files with 4 additions and 2 deletions

View File

@ -22,8 +22,8 @@ moduleinfo = {
moduleconfig = ['apikey'] moduleconfig = ['apikey']
misperrors = {'error': 'Error'} misperrors = {'error': 'Error'}
mispattributes = { mispattributes = {
'input': ['hostname', 'domain', 'url'], 'input': ['hostname', 'domain', 'url', 'hash'],
'output': ['hostname', 'domain', 'ip-src', 'ip-dst', 'url', 'text', 'link'] 'output': ['hostname', 'domain', 'ip-src', 'ip-dst', 'url', 'text', 'link', 'hash']
} }
@ -49,6 +49,8 @@ def handler(q=False):
r['results'] += lookup_indicator(client, request['hostname']) r['results'] += lookup_indicator(client, request['hostname'])
if 'url' in request: if 'url' in request:
r['results'] += lookup_indicator(client, request['url']) r['results'] += lookup_indicator(client, request['url'])
f 'hash' in request:
r['results'] += lookup_indicator(client, request['hash'])
# Return any errors generated from lookup to the UI and remove duplicates # Return any errors generated from lookup to the UI and remove duplicates