Skip to content

Commit

Permalink
Handle the condition when ioc is not found and a 404 is returned (The…
Browse files Browse the repository at this point in the history
…Hive-Project#26)

* Handle the condition when ioc is not found and a 404 is returned

* Handle the condition where 404 is returned instead of an IOC, remove inputs from the report and sanitization
  • Loading branch information
MOAZZAM KHAN authored and Vivian-Dsilva committed Sep 2, 2021
1 parent c41d133 commit af781bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion analyzers/RecordedFuture/recordedfuture.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def run(self):
self.summary(j)
return self.report(j)
except IOError as e:
self.error(str(e))
if e.code == 404:
self.report({'message':'IOC Not Found.'})
else:
self.error(str(e))
else:
self.error('Invalid data type')

Expand Down

0 comments on commit af781bc

Please sign in to comment.