msticpy/datamodel/pivot_ti_provider.py
def create_ti_pivot_funcs(ti_lookup: TILookup):
    """Create the TI Pivot functions."""
    ioc_type_supp = _get_supported_ioc_types(ti_lookup)
    ioc_queries: Dict[str, Dict[str, Callable[..., pd.DataFrame]]] = defaultdict(dict)

    # Add functions for ioc types that will call all providers
    # Non-IP types
    ioc_queries.update(_get_non_ip_functions(ioc_type_supp, ti_lookup))
    # Special case for ipv4 and ipv6 - we want to merge these into "ip" if these are equivalent
    ioc_queries.update(_get_ip_functions(ioc_type_supp, ti_lookup))

    # Add functions for provider-specific lookup function names
    # These have a "_provider_name" suffix
    for prov, ioc_set in ioc_type_supp.items():
        for ioc in ioc_set:
            ioc_name = _merged_ip_ioc_type(ioc, ti_lookup.loaded_providers.get(prov))
            if not ioc_name:
                continue
            _, func_name, func = _create_lookup_func(ti_lookup, ioc, ioc, [prov])
            func_name = f"{func_name}_{prov}"
            ioc_queries[ioc][func_name] = func
    return ioc_queries
Create the TI Pivot functions.
Create the TI Pivot functions.
Create the TI Pivot functions .
def create_ti_pivot_funcs(ti_lookup: TILookup):
    ioc_type_supp = _get_supported_ioc_types(ti_lookup)
    ioc_queries: Dict[str, Dict[str, Callable[..., pd.DataFrame]]] = defaultdict(dict)
    ioc_queries.update(_get_non_ip_functions(ioc_type_supp, ti_lookup))
    ioc_queries.update(_get_ip_functions(ioc_type_supp, ti_lookup))
    for prov, ioc_set in ioc_type_supp.items():
        for ioc in ioc_set:
            ioc_name = _merged_ip_ioc_type(ioc, ti_lookup.loaded_providers.get(prov))
            if not ioc_name:
                continue
            _, func_name, func = _create_lookup_func(ti_lookup, ioc, ioc, [prov])
            func_name = f"{func_name}_{prov}"
            ioc_queries[ioc][func_name] = func
    return ioc_queries
def create_ti_pivot_funcs ( ti_lookup : TILookup ) : ioc_type_supp = _get_supported_ioc_types ( ti_lookup ) ioc_queries : Dict [ str , Dict [ str , Callable [ ... , pd . DataFrame ] ] ] = defaultdict ( dict ) ioc_queries . update ( _get_non_ip_functions ( ioc_type_supp , ti_lookup ) ) ioc_queries . update ( _get_ip_functions ( ioc_type_supp , ti_lookup ) ) for prov , ioc_set in ioc_type_supp . items ( ) : for ioc in ioc_set : ioc_name = _merged_ip_ioc_type ( ioc , ti_lookup . loaded_providers . get ( prov ) ) if not ioc_name : continue _ , func_name , func = _create_lookup_func ( ti_lookup , ioc , ioc , [ prov ] ) func_name = f"{func_name}_{prov}" ioc_queries [ ioc ] [ func_name ] = func return ioc_queries
Create the TI Pivot functions.
Create the TI Pivot functions .
"""Create the TI Pivot functions.""" # Add functions for ioc types that will call all providers # Non-IP types # Special case for ipv4 and ipv6 - we want to merge these into "ip" if these are equivalent # Add functions for provider-specific lookup function names # These have a "_provider_name" suffix
ti_lookup
TILookup