yawning_titan.networks.node#
Classes
A Node for building networks with yawning_titan.networks.network.Network. |
- class yawning_titan.networks.node.Node(name=None, high_value_node=False, entry_node=False, vulnerability=0.01)[source]#
A Node for building networks with yawning_titan.networks.network.Network.
The Node constructor.
- Parameters:
name – An optional name for the Node.
high_value_node – Whether the Node is a high value node. Default value of False.
entry_node – Whether the Node is an entry node. Default value of False.
vulnerability – The vulnerability score of the Node. Has a default value of 0.1.
- __init__(name=None, high_value_node=False, entry_node=False, vulnerability=0.01)[source]#
The Node constructor.
- Parameters:
name – An optional name for the Node.
high_value_node – Whether the Node is a high value node. Default value of False.
entry_node – Whether the Node is an entry node. Default value of False.
vulnerability – The vulnerability score of the Node. Has a default value of 0.1.
- classmethod create_from_db(uuid, high_value_node, entry_node, vulnerability, x_pos, y_pos, name=None, **kwargs)[source]#
Used to create an instance of Node from the NetworkDB.
- Parameters:
uuid – the UUID given to a Node when it was first created.
high_value_node – Whether the Node is a high value node.
entry_node – Whether the Node is an entry node.
vulnerability – The vulnerability score of the Node.
x_pos – The x-position when displayed on a network graph.
y_pos – The y-position when displayed on a network graph.
name – An optional name for the Node.
- Returns:
The instance of Node.
- reset_vulnerability()[source]#
Resets the nodes current vulnerability_score to the original vulnerability.
- property node_position#
The nodes position as a list [x,y].
- property vulnerability#
The nodes initial vulnerability.
- property uuid#
The node UUID.
- property high_value_node#
True if the Node is high value, otherwise False.
- property entry_node#
True if the Node is an entry node, otherwise False.
- property x_pos#
The x-position of the node.
- property y_pos#
The y-position of the node.