From 4a3c66bdc605e5ce0ee6863f30395a6d3a83ed84 Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 20 Feb 2024 12:04:07 +0000 Subject: [PATCH] Clear notebook code cells. --- src/primaite/notebooks/uc2_demo.ipynb | 680 +------------------------- 1 file changed, 21 insertions(+), 659 deletions(-) diff --git a/src/primaite/notebooks/uc2_demo.ipynb b/src/primaite/notebooks/uc2_demo.ipynb index b37e69fc..48ca795a 100644 --- a/src/primaite/notebooks/uc2_demo.ipynb +++ b/src/primaite/notebooks/uc2_demo.ipynb @@ -333,7 +333,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -343,20 +343,9 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/cade/repos/PrimAITE/venv/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", - " from .autonotebook import tqdm as notebook_tqdm\n", - "2024-02-07 10:58:13,192\tINFO util.py:159 -- Missing packages: ['ipywidgets']. Run `pip install -U ipywidgets`, then restart the notebook server for rich notebook output.\n", - "2024-02-07 10:58:17,136\tINFO util.py:159 -- Missing packages: ['ipywidgets']. Run `pip install -U ipywidgets`, then restart the notebook server for rich notebook output.\n" - ] - } - ], + "outputs": [], "source": [ "# Imports\n", "from primaite.config.load import example_config_path\n", @@ -377,134 +366,9 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Resetting environment, episode 0, avg. reward: 0.0\n", - "env created successfully\n", - "{'ACL': {1: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 0,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 2: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 1,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 3: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 2,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 4: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 3,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 5: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 4,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 6: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 5,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 7: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 6,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 8: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 7,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 9: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 8,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0},\n", - " 10: {'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'permission': 0,\n", - " 'position': 9,\n", - " 'protocol': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0}},\n", - " 'ICS': 0,\n", - " 'LINKS': {1: {'PROTOCOLS': {'ALL': 0}},\n", - " 2: {'PROTOCOLS': {'ALL': 0}},\n", - " 3: {'PROTOCOLS': {'ALL': 0}},\n", - " 4: {'PROTOCOLS': {'ALL': 0}},\n", - " 5: {'PROTOCOLS': {'ALL': 0}},\n", - " 6: {'PROTOCOLS': {'ALL': 0}},\n", - " 7: {'PROTOCOLS': {'ALL': 0}},\n", - " 8: {'PROTOCOLS': {'ALL': 0}},\n", - " 9: {'PROTOCOLS': {'ALL': 0}},\n", - " 10: {'PROTOCOLS': {'ALL': 0}}},\n", - " 'NODES': {1: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 2: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 3: {'FOLDERS': {1: {'FILES': {1: {'health_status': 1}},\n", - " 'health_status': 1}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 4: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 5: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 6: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 7: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}},\n", - " 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1}}}\n" - ] - } - ], + "outputs": [], "source": [ "# create the env\n", "with open(example_config_path(), 'r') as f:\n", @@ -532,7 +396,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -550,51 +414,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "step: 1, Red action: DO NOTHING, Blue reward:0.34\n", - "step: 2, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 3, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 4, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 5, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 6, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 7, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 8, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 9, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 10, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 11, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 12, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 13, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 14, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 15, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 16, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 17, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 18, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 19, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 20, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 21, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 22, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 23, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 24, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 25, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 26, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 27, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 28, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 29, Red action: DO NOTHING, Blue reward:1.0\n", - "step: 30, Red action: ATTACK from client 1, Blue reward:0.32\n", - "step: 31, Red action: DO NOTHING, Blue reward:0.32\n", - "step: 32, Red action: DO NOTHING, Blue reward:0.32\n", - "step: 33, Red action: DO NOTHING, Blue reward:-1.0\n", - "step: 34, Red action: DO NOTHING, Blue reward:-1.0\n", - "step: 35, Red action: DO NOTHING, Blue reward:-1.0\n" - ] - } - ], + "outputs": [], "source": [ "for step in range(35):\n", " obs, reward, terminated, truncated, info = env.step(0)\n", @@ -610,44 +432,9 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{1: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 2: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 3: {'FOLDERS': {1: {'FILES': {1: {'health_status': 1}}, 'health_status': 1}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 4: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 5: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 6: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 7: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1}}\n" - ] - } - ], + "outputs": [], "source": [ "pprint(obs['NODES'])" ] @@ -661,44 +448,9 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{1: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 2: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 3, 'operating_status': 1}},\n", - " 'operating_status': 1},\n", - " 3: {'FOLDERS': {1: {'FILES': {1: {'health_status': 2}}, 'health_status': 1}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 4: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 5: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 6: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1},\n", - " 7: {'FOLDERS': {1: {'FILES': {1: {'health_status': 0}}, 'health_status': 0}},\n", - " 'NICS': {1: {'nic_status': 1}, 2: {'nic_status': 0}},\n", - " 'SERVICES': {1: {'health_status': 0, 'operating_status': 0}},\n", - " 'operating_status': 1}}\n" - ] - } - ], + "outputs": [], "source": [ "obs, reward, terminated, truncated, info = env.step(9) # scan database file\n", "obs, reward, terminated, truncated, info = env.step(1) # scan webapp service\n", @@ -722,21 +474,9 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "step: 38\n", - "Red action: DONOTHING\n", - "Green action: NODE_APPLICATION_EXECUTE\n", - "Green action: NODE_APPLICATION_EXECUTE\n", - "Blue reward:-1.0\n" - ] - } - ], + "outputs": [], "source": [ "obs, reward, terminated, truncated, info = env.step(13) # patch the database\n", "print(f\"step: {env.game.step_counter}\")\n", @@ -759,21 +499,9 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "step: 39\n", - "Red action: DONOTHING\n", - "Green action: NODE_APPLICATION_EXECUTE\n", - "Green action: DONOTHING\n", - "Blue reward:-0.32\n" - ] - } - ], + "outputs": [], "source": [ "obs, reward, terminated, truncated, info = env.step(0) # patch the database\n", "print(f\"step: {env.game.step_counter}\")\n", @@ -794,49 +522,9 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "step: 139, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 140, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 141, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 142, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 143, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 144, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 145, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 146, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 147, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 148, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 149, Red action: NODE_APPLICATION_EXECUTE, Blue reward:-0.32\n", - "step: 150, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 151, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 152, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 153, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 154, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 155, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 156, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 157, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 158, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 159, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 160, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 161, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 162, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 163, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 164, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 165, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 166, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 167, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 168, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 169, Red action: NODE_APPLICATION_EXECUTE, Blue reward:-0.32\n", - "step: 170, Red action: DONOTHING, Blue reward:-0.32\n", - "step: 171, Red action: DONOTHING, Blue reward:-0.32\n" - ] - } - ], + "outputs": [], "source": [ "env.step(13) # Patch the database\n", "print(f\"step: {env.game.step_counter}, Red action: {info['agent_actions']['data_manipulation_attacker'][0]}, Blue reward:{reward}\" )\n", @@ -868,345 +556,19 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{1: {'position': 0,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 2: {'position': 1,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 3: {'position': 2,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 4: {'position': 3,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 5: {'position': 4,\n", - " 'permission': 2,\n", - " 'source_node_id': 7,\n", - " 'source_port': 1,\n", - " 'dest_node_id': 4,\n", - " 'dest_port': 1,\n", - " 'protocol': 3},\n", - " 6: {'position': 5,\n", - " 'permission': 2,\n", - " 'source_node_id': 8,\n", - " 'source_port': 1,\n", - " 'dest_node_id': 4,\n", - " 'dest_port': 1,\n", - " 'protocol': 3},\n", - " 7: {'position': 6,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 8: {'position': 7,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 9: {'position': 8,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0},\n", - " 10: {'position': 9,\n", - " 'permission': 0,\n", - " 'source_node_id': 0,\n", - " 'source_port': 0,\n", - " 'dest_node_id': 0,\n", - " 'dest_port': 0,\n", - " 'protocol': 0}}" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "obs['ACL']" ] }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [], - "source": [ - "router = env.game.simulation.network.get_node_by_hostname('router_1')" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+------------------------------------------------------------------------------------------------------------+\n", - "| router_1 Access Control List |\n", - "+-------+--------+----------+---------------+------------------------+--------------+------------------------+\n", - "| Index | Action | Protocol | Src IP | Src Port | Dst IP | Dst Port |\n", - "+-------+--------+----------+---------------+------------------------+--------------+------------------------+\n", - "| 5 | DENY | TCP | 192.168.10.21 | ANY | 192.168.1.14 | ANY |\n", - "| 6 | DENY | TCP | 192.168.10.22 | ANY | 192.168.1.14 | ANY |\n", - "| 18 | PERMIT | ANY | ANY | 5432 (POSTGRES_SERVER) | ANY | 5432 (POSTGRES_SERVER) |\n", - "| 19 | PERMIT | ANY | ANY | 53 (DNS) | ANY | 53 (DNS) |\n", - "| 20 | PERMIT | ANY | ANY | 21 (FTP) | ANY | 21 (FTP) |\n", - "| 21 | PERMIT | ANY | ANY | 80 (HTTP) | ANY | 80 (HTTP) |\n", - "| 22 | PERMIT | ANY | ANY | 219 (ARP) | ANY | 219 (ARP) |\n", - "| 23 | PERMIT | ICMP | ANY | ANY | ANY | ANY |\n", - "| 24 | DENY | ANY | ANY | ANY | ANY | ANY |\n", - "+-------+--------+----------+---------------+------------------------+--------------+------------------------+\n" - ] - } - ], - "source": [ - "router.acl.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[(, 0.34),\n", - " (,\n", - " 0.33),\n", - " (,\n", - " 0.33)]" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "env.agent.reward_function.reward_components" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": {}, - "outputs": [], - "source": [ - "client_1 = env.game.simulation.network.get_node_by_hostname('client_1')\n", - "client_2 = env.game.simulation.network.get_node_by_hostname('client_2')" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [], - "source": [ - "client_1_browser = client_1.software_manager.software.get(\"WebBrowser\")\n", - "client_2_browser = client_2.software_manager.software.get(\"WebBrowser\")" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=),\n", - " BrowserHistoryItem(url='http://arcd.com/users/', status=<_HistoryItemStatus.LOADED: 'LOADED'>, response_code=)]" - ] - }, - "execution_count": 26, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "client_2_browser.history" - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "False" - ] - }, - "execution_count": 35, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "client_1_browser.get_webpage()" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "metadata": {}, - "outputs": [], - "source": [ - "database_server = env.game.simulation.network.get_node_by_hostname('database_server')" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "File(uuid='390c399a-c2ab-4d84-b98f-d5fc1f9114d2', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={'390c399a-c2ab-4d84-b98f-d5fc1f9114d2': File(uuid='390c399a-c2ab-4d84-b98f-d5fc1f9114d2', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={'e63e23dc-c443-4434-822d-3c2c01cbfe1e': File(uuid='e63e23dc-c443-4434-822d-3c2c01cbfe1e', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=True, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={...}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e'])), '646a198e-6ac1-4aea-b526-7ca5c2c30dfc': File(uuid='646a198e-6ac1-4aea-b526-7ca5c2c30dfc', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=True, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={...}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e'])), '23df7aba-074e-4ffa-939a-d87ad1fe7af1': File(uuid='23df7aba-074e-4ffa-939a-d87ad1fe7af1', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=True, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={...}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e']))}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e']))}, deleted_files={'e63e23dc-c443-4434-822d-3c2c01cbfe1e': File(uuid='e63e23dc-c443-4434-822d-3c2c01cbfe1e', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=True, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={'390c399a-c2ab-4d84-b98f-d5fc1f9114d2': File(uuid='390c399a-c2ab-4d84-b98f-d5fc1f9114d2', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={...}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e']))}, deleted_files={...}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e'])), '646a198e-6ac1-4aea-b526-7ca5c2c30dfc': File(uuid='646a198e-6ac1-4aea-b526-7ca5c2c30dfc', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=True, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={'390c399a-c2ab-4d84-b98f-d5fc1f9114d2': File(uuid='390c399a-c2ab-4d84-b98f-d5fc1f9114d2', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={...}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e']))}, deleted_files={...}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e'])), '23df7aba-074e-4ffa-939a-d87ad1fe7af1': File(uuid='23df7aba-074e-4ffa-939a-d87ad1fe7af1', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=True, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={'390c399a-c2ab-4d84-b98f-d5fc1f9114d2': File(uuid='390c399a-c2ab-4d84-b98f-d5fc1f9114d2', name='database.db', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, folder_id='e602b9a6-ea1c-4c52-9025-8512d9116b1d', folder_name='database', file_type=, sim_size=15360000, real=False, sim_path=None, sim_root=PosixPath('/home/cade/primaite/3.0.0b6/sessions/2024-02-07/10-58-18/simulation_output/database_server/fs'), folder=Folder(uuid='e602b9a6-ea1c-4c52-9025-8512d9116b1d', name='database', health_status=, visible_health_status=, previous_hash=None, revealed_to_red=False, sys_log=, deleted=False, files={...}, deleted_files={...}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e']))}, deleted_files={...}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e']))}, scan_duration=3, scan_countdown=-1, red_scan_duration=3, red_scan_countdown=-1, restore_duration=3, restore_countdown=-1, original_file_uuids=['e63e23dc-c443-4434-822d-3c2c01cbfe1e']))" - ] - }, - "execution_count": 31, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "database_server.file_system.get_file('database', 'database.db')" - ] - }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], - "source": [ - "database_server." - ] + "source": [] } ], "metadata": {