def run(self, params={}): field = params.get('field') query = params['query'] self.logger.info('Query and field: %s %s', query, field) results = self.connection.whois.search_whois_by_field(query=query, field=field) if results: results = util.clean_dict_recursive(results) return {'found': not not results, 'record': results}
def run(self, params={}): field = params.get("field") query = params["query"] self.logger.info("Query and field: %s %s", query, field) results = self.connection.whois.search_whois_by_field(query=query, field=field) if results: results = util.clean_dict_recursive(results) return {"found": not not results, "record": results}
def run(self, params={}): compact_record = not not params.get("compact_record") query = params["query"] self.logger.info("Query: %s", query) results = self.connection.whois.get_whois_details( query=query, compact_record=compact_record) if results: results = util.clean_dict_recursive(results) return {"found": not not results, "record": results}
def run(self, params={}): compact_record = not not params.get('compact_record') query = params['query'] self.logger.info('Query: %s', query) results = self.connection.whois.get_whois_details( query=query, compact_record=compact_record) if results: results = util.clean_dict_recursive(results) return {'found': not not results, 'record': results}
def run(self, params={}): query = params["query"] self.logger.info("Query %s", query) results = self.connection.whois.search_keyword(query=query) if results and "results" in results: self.logger.debug("Returned: %s", results) results = util.clean_dict_recursive(results) results = results["results"] count = len(results) return {"count": count, "results": results}
def run(self, params={}): query = params['query'] self.logger.info('Query %s', query) results = self.connection.whois.search_keyword(query=query) if results and 'results' in results: self.logger.debug('Returned: %s', results) results = util.clean_dict_recursive(results) results = results['results'] count = len(results) return {'count': count, 'results': results}
def run(self, params={}): url = "https://api.passivetotal.org/v2/ssl-certificate" auth = (self.connection.username, self.connection.api_key) sha1 = params.get("sha1") params = {"query": sha1} self.logger.info("Lookup hash: %s", sha1) response = requests.get(url, auth=auth, params=params) content = json.loads(response.content) self.logger.debug("Returned: %s", content) if not content: return {"found": False} content["found"] = True output = util.clean_dict_recursive(content) return output
def run(self, params={}): url = 'https://api.passivetotal.org/v2/ssl-certificate' auth = (self.connection.username, self.connection.api_key) sha1 = params.get('sha1') params = {'query': sha1} self.logger.info('Lookup hash: %s', sha1) response = requests.get(url, auth=auth, params=params) content = json.loads(response.content) self.logger.debug('Returned: %s', content) if not content: return {'found': False} content['found'] = True output = util.clean_dict_recursive(content) return output