Skip to content

Commit

Permalink
#327 Use get_param function instead of getParam, and remove useless s…
Browse files Browse the repository at this point in the history
…tatements
  • Loading branch information
nadouani committed Dec 20, 2018
1 parent caf611f commit 08220f0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions analyzers/Shodan/shodan_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ShodanAnalyzer(Analyzer):
def __init__(self):
Analyzer.__init__(self)
self.shodan_key = self.get_param('config.key', None, 'Missing Shodan API key')
self.service = self.getParam('config.service', None, 'Service parameter is missing')
self.service = self.get_param('config.service', None, 'Service parameter is missing')
self.shodan_client = None

def execute_shodan_service(self, data):
Expand All @@ -23,7 +23,7 @@ def execute_shodan_service(self, data):
results = {'records': self.shodan_client.reverse_dns(data)}
return results
elif self.service == 'search':
page = self.getParam('parameters.page', 1, None)
page = self.get_param('parameters.page', 1, None)
results = {'records': self.shodan_client.search(data, page)}
return results
elif self.service == 'info_domain':
Expand Down Expand Up @@ -73,8 +73,6 @@ def summary(self, raw):
return {'taxonomies': taxonomies}

def run(self):
Analyzer.run(self)

try:
self.shodan_client = ShodanAPIPublic(self.shodan_key)
data = self.get_param('data', None, 'Data is missing')
Expand Down

0 comments on commit 08220f0

Please sign in to comment.