This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boto3.session import Session | |
from botocore.client import Config | |
from botocore.handlers import set_list_objects_encoding_type_url | |
import boto3 | |
ACCESS_KEY = "xx" | |
SECRET_KEY = "yy" | |
boto3.set_stream_logger('') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= Examples of how OTX API calls relate different indicator types = | |
Official documentation is available at https://otx.alienvault.com/api but may be missing a couple of the newer calls | |
These are some unofficial notes | |
The API key below is for a dummy demo account. It should work but I would suggest using your own. | |
Some of the JSON responses are quite nested, and editor such as http://jsoneditoronline.org/ may be useful | |
== Input: Hostname / Domain == | |
The following calls can be made for both domains and hostname, ie you can swap 'hostname' with 'domain' below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from OTXv2 import OTXv2 | |
# API key for the user api_example | |
# Pulses will appear at https://otx.alienvault.com/user/api_example/pulses | |
otx = OTXv2("766ba1df3ab54db9c0fcbf62ef048c3a04c260e8ca65b6c25346084b7b4719ad") | |
name = 'Test Pulse' | |
indicators = [ | |
{'indicator': '69.73.130.198', 'type': 'IPv4'}, | |
{'indicator': 'aoldaily.com', 'type': 'Domain'} | |
] |