How to use the ipinfo.IPInfo.VTAPIKEY function in ipinfo

To help you get started, we’ve selected a few ipinfo 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 idiom / IRScripts / ipinfo.py View on Github external
def queryvt(self):
        if IPInfo.VTAPIKEY == '---Your API Key---':
            return {'response_code':0,'verbose_msg':'No API Key'}
        parameters = {'ip': self.ip, 'apikey': IPInfo.VTAPIKEY}
        url = 'https://www.virustotal.com/vtapi/v2/ip-address/report?%s' % urllib.urlencode(parameters)
        response = json.loads(self.__sendrequest(url).read())
        return response