AlienVault-OTX / OTX-Python-SDK

The Python SDK for AlienVault OTX
Other
358 stars 162 forks source link

Example in README.md fails #35

Closed nealrauhauser closed 7 years ago

nealrauhauser commented 7 years ago

This snippet of code from README.md fails in the google.com portion:

from OTXv2 import OTXv2
otx = OTXv2("API_KEY")
# Get all the indicators associated with a pulse
indicators = otx.get_pulse_indicators("pulse_id")
for indicator in indicators:
    print indicator["indicator"] + indicator["type"]
# Get everything OTX knows about google.com
otx.get_indicator_details_full(IndicatorTypes.DOMAIN, "google.com")

Needs the following additional line:

from OTXv2 import IndicatorTypes

jaimeblasco commented 7 years ago

@nealrauhauser Fixed, thanks!