In [ ]:
#!pip install graphistry -q
#!pip install OTXv2 -q
In [ ]:
import graphistry
import pandas as pd
from OTXv2 import OTXv2, IndicatorTypes
from gotx import G_OTX
In [ ]:
#graphistry.register(key='MY_API_KEY', server='labs.graphistry.com')
otx = OTXv2("MY_KEY")
g_otx = G_OTX(graphistry, otx)
In [ ]:
lockergoga_pulses = otx.search_pulses('LockerGoga').get('results')
In [ ]:
lockergoga_pulses_df = g_otx.pulses_to_df(lockergoga_pulses)
lockergoga_indicators_df = g_otx.pulses_to_indicators_df(lockergoga_pulses)
g = g_otx.indicatormap(lockergoga_pulses_df, lockergoga_indicators_df)
g.plot()
In [ ]:
ip_pulses = otx.get_indicator_details_by_section(IndicatorTypes.IPv4, lockergoga_indicators_df[lockergoga_indicators_df['indicator_type'] == 'IPv4'].values[0][0])
In [ ]:
ip_pulses_df = g_otx.indicator_details_by_section_to_pulses_df(ip_pulses)
ip_indicators_df = g_otx.indicator_details_by_section_to_indicators_df(ip_pulses)
g_otx.indicatormap(ip_pulses_df, ip_indicators_df).plot()