How to use the investigate.Investigate function in investigate

To help you get started, we’ve selected a few investigate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github opendns / brand_watch / BrandWatch / __init__.py View on Github external
brand -- Brand name string to include in pattern searches. Brands that are also very common names may return lots of results
        exclude -- (Optional) list of domains that should be excluded from searches
        """

        if api_key is None or brand is None:
            raise Exception('No API key or Brand defined')

        self.api_key = api_key
        self.brand = brand
        self.exclude = exclude
        self.days = days
        self.limit = limit
        self.include_category=include_category
        self.regex_list = []

        self.inv = investigate.Investigate(api_key)
        self.generate()
github ibmresilient / resilient-community-apps / fn_cisco_umbrella_inv / fn_cisco_umbrella_inv / util / resilient_inv.py View on Github external
import logging
import datetime, time
import json
import sys
from investigate import Investigate

log = logging.getLogger(__name__)

class DATETIME_ERR(ValueError):
    def __init__(self, value):
        self.err_msg = value

    def __str__(self):
        return repr(self.err_msg)

class ResilientInv(Investigate):
    """ Extend base Investigate Class to add support for unsupported and buggy methods.

    """
    def __init__(self, api_key, base_url, proxies={}):
        """ New initialization parameters added.

        :param api_key: Thw api_kewy value from config.
        :param base_url: The base_url value from config.

        """
        super(ResilientInv, self).__init__(api_key, proxies)

        # If python version 2 convert existing uris to unicode object instead of string.
        if sys.version_info.major == 2:
            for k, v in self._uris.items():
                self._uris[k] = v.decode('unicode-escape')