diff --git a/misp_modules/modules/expansion/hashdd.py b/misp_modules/modules/expansion/hashdd.py index 907447f..42fc854 100755 --- a/misp_modules/modules/expansion/hashdd.py +++ b/misp_modules/modules/expansion/hashdd.py @@ -23,11 +23,7 @@ def handler(q=False): r = requests.post(hashddapi_url, data={'hash': v}) if r.status_code == 200: state = json.loads(r.text) - if state: - if state.get(v): - summary = state[v]['known_level'] - else: - summary = 'Unknown hash' + summary = state[v]['known_level'] if state and state.get(v) else 'Unknown hash' else: misperrors['error'] = '{} API not accessible'.format(hashddapi_url) return misperrors['error']