Пример #1
0
    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}
Пример #2
0
    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}
Пример #3
0
    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}
Пример #4
0
    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}
Пример #5
0
    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}
Пример #6
0
    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}
Пример #7
0
 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
Пример #8
0
 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