IpConnection

IpConnectionView

class grapl_analyzerlib.nodes.ip_connection.IpConnectionView(uid: int, node_key: str, graph_client, node_types: Set[str], src_ip_address=None, src_port=None, dst_ip_address=None, dst_port=None, created_timestamp=None, terminated_timestamp=None, last_seen_timestamp=None, inbound_ip_connection_to=None, **kwargs)

Predicate

Type

Description

node_key

string

A unique identifier for this node.

created_timestamp

int

Time of the connection creation (in millis-since-epoch).

last_seen_timestamp

int

Time the connection was last seen (in millis-since-epoch).

terminated_timestamp

int

Time connection was terminated (in millis-since-epoch).

classmethod associated_queryable() Type[grapl_analyzerlib.viewable.Q]
connecting_ips = None
classmethod extend_self(*types)

extend_self is a method that performs some monkeypatching to allow combinations of types.

Parameters

types – A var arg of types, all of which must implement the Extendable interface

Returns

Returns a new class, which inherits from ‘cls’ and all passed in types, the returned class will also have all methods of all types that are not prefixed with __

classmethod from_dict(d: Dict[str, Any], graph_client: Any) grapl_analyzerlib.viewable.V
from_node_key(node_key: str) Optional[BaseView]
get_connecting_ips(*connecting_ips: grapl_analyzerlib.nodes.ip_address.IpAddressSchema, cached=False)
get_created_timestamp(cached=True)
get_dst_ip_address(cached=True)
get_dst_port(cached=True)
get_inbound_ip_connection_to(*ip_addresses, cached=False)
get_int(property_name: str, cached=True) Optional[int]
get_last_seen_timestamp(cached=True)
get_lenses(*lenses, cached=False) List[grapl_analyzerlib.nodes.lens.LensView]
get_neighbor(default: Type[Q], f_edge: str, r_edge: str, filters, cached=True) Optional[OneOrMany[V]]
get_node_type() str
get_risks(*risks, cached=False) List[grapl_analyzerlib.nodes.risk.RiskView]
get_src_ip_address(cached=True)
get_src_port(cached=True)
get_str(property_name: str, cached=True) Optional[str]
get_terminated_timestamp(cached=True)
into_view(v: Type[grapl_analyzerlib.viewable.Viewable]) Optional[grapl_analyzerlib.viewable.Viewable]
classmethod node_schema() Schema
queryable

alias of grapl_analyzerlib.nodes.ip_connection.IpConnectionQuery

set_predicate(predicate_name: str, predicate: Union[List[Union[str, int, bool]], str, int, bool, grapl_analyzerlib.viewable.Viewable])
to_adjacency_list()
to_dict()

IpConnectionQuery

class grapl_analyzerlib.nodes.ip_connection.IpConnectionQuery
classmethod associated_viewable() Type[grapl_analyzerlib.queryable.V]
clear_neighbor_filters()
clear_property_filters()
debug_query() Dict[str, Any]
classmethod extend_self(*types)

extend_self is a method that performs some monkeypatching to allow combinations of types.

Parameters

types – A var arg of types, all of which must implement the Extendable interface

Returns

Returns a new class, which inherits from ‘cls’ and all passed in types, the returned class will also have all methods of all types that are not prefixed with __

get_count(graph_client, first: int = 100) int
neighbor_filters() List[Tuple[str, Union[List[grapl_analyzerlib.queryable.Q], List[Tuple[grapl_analyzerlib.queryable.Q, ...]]]]]
classmethod node_schema() Schema
property_filters() List[Tuple[str, List[List[Cmp]]]]
query(graph_client: grapl_analyzerlib.grapl_client.GraphClient, first: int) List[grapl_analyzerlib.queryable.V]
query_first(graph_client: grapl_analyzerlib.grapl_client.GraphClient, contains_node_key: Optional[str] = None, best_effort=False) Optional[grapl_analyzerlib.queryable.V]
set_neighbor_filters(edge_name: str, filters: Union[List[grapl_analyzerlib.queryable.Q], List[Tuple[grapl_analyzerlib.queryable.Q, ...]]])
set_property_filters(property_name: str, filters: List[List[Cmp]])
with_connecting_ips(*connecting_ips: grapl_analyzerlib.nodes.ip_address.IpAddressSchema)
with_created_timestamp(*, eq: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, gt: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, ge: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, lt: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, le: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None)
with_dst_ip_address(*, eq: Optional[StrOrNot] = None, contains: Optional[OneOrMany[StrOrNot]] = None, starts_with: Optional[StrOrNot] = None, ends_with: Optional[StrOrNot] = None, regexp: Optional[OneOrMany[StrOrNot]] = None, distance_lt: Optional[Tuple[str, int]] = None) ProcessQuery
with_dst_port(*, eq: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, gt: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, ge: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, lt: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, le: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None)
with_inbound_ip_connection_to(*ip_addresses)
with_int_property(property_name: str, *, eq: Optional[IntOrNot] = None, gt: Optional[IntOrNot] = None, ge: Optional[IntOrNot] = None, lt: Optional[IntOrNot] = None, le: Optional[IntOrNot] = None)
with_last_seen_timestamp(*, eq: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, gt: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, ge: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, lt: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, le: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None)
with_lenses(*lenses: LensQuery)
with_node_key(*, eq: str) grapl_analyzerlib.queryable.Q
with_risks(*risks: RiskQuery)
with_src_ip_address(*, eq: Optional[StrOrNot] = None, contains: Optional[OneOrMany[StrOrNot]] = None, starts_with: Optional[StrOrNot] = None, ends_with: Optional[StrOrNot] = None, regexp: Optional[OneOrMany[StrOrNot]] = None, distance_lt: Optional[Tuple[str, int]] = None) ProcessQuery
with_src_port(*, eq: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, gt: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, ge: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, lt: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, le: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None)
with_str_property(property_name: str, *, eq: Optional[StrOrNot] = None, contains: Optional[OneOrMany[StrOrNot]] = None, starts_with: Optional[StrOrNot] = None, ends_with: Optional[StrOrNot] = None, regexp: Optional[OneOrMany[StrOrNot]] = None, distance_lt: Optional[Tuple[str, int]] = None)
with_terminated_timestamp(*, eq: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, gt: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, ge: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, lt: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None, le: Optional[Union[int, grapl_analyzerlib.comparators.Not]] = None)
with_to_neighbor(default, f, r, edges) Q