-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env python | ||
## | ||
# Developed by Alex (https://github.com/grispan56) | ||
# Module to implement indicators search functionality in cybercure.ai api | ||
# | ||
## | ||
from http import get | ||
|
||
from common import warning | ||
|
||
|
||
class Plugin(object): | ||
def __init__(self, artifact): | ||
self.artifact = artifact | ||
self.artifact['data']['cybercure'] = None | ||
|
||
|
||
def run(self): | ||
url = 'http://api.cybercure.ai/feed/search?value=%s' % self.artifact['name'] | ||
headers = {'User-Agent': 'OSINT Omnibus (https://github.com/InQuest/Omnibus)'} | ||
|
||
try: | ||
status, response = get(url, headers=headers) | ||
if status: | ||
results = response.json() | ||
self.artifact['data']['cybercure'] = results | ||
except Exception as err: | ||
warning('Caught exception in module (%s)' % str(err)) | ||
|
||
|
||
def main(artifact): | ||
plugin = Plugin(artifact) | ||
plugin.run() | ||
return plugin.artifact | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters