#2706 - Updates to Terminal Processing notebook to highlight utility function and improve formatting
This commit is contained in:
@@ -63,19 +63,33 @@
|
|||||||
"computer_a: Computer = network.get_node_by_hostname(\"node_a\")\n",
|
"computer_a: Computer = network.get_node_by_hostname(\"node_a\")\n",
|
||||||
"terminal_a: Terminal = computer_a.software_manager.software.get(\"Terminal\")\n",
|
"terminal_a: Terminal = computer_a.software_manager.software.get(\"Terminal\")\n",
|
||||||
"computer_b: Computer = network.get_node_by_hostname(\"node_b\")\n",
|
"computer_b: Computer = network.get_node_by_hostname(\"node_b\")\n",
|
||||||
|
"terminal_b: Terminal = computer_b.software_manager.software.get(\"Terminal\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# The below can be un-commented when UserSessionManager is implemented. Will need to login before sending any SSH commands\n",
|
"# Login to the remote (node_b) from local (node_a)\n",
|
||||||
"# to remote.\n",
|
"terminal_a.login(username=\"admin\", password=\"Admin123!\", ip_address=computer_b.network_interface[1].ip_address)\n"
|
||||||
"# terminal_a.login(username=\"admin\", password=\"Admin123!\", ip_address=computer_b.network_interface[1].ip_address)"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"The Terminal can be used to install new software. The code block below demonstrates how the Terminal class allows the user of `terminal_a`, on `computer_a`, to send a command to `computer_b` to install the `RansomwareScript` application. \n",
|
"You can view all remote connections to a terminal through use of the `show()` method"
|
||||||
"\n",
|
]
|
||||||
"Once ran and the command sent, the `RansomwareScript` can be seen in the list of applications on the `node_b Software Manager`. "
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"terminal_b.show()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"The Terminal can be used to install new software. The code block below demonstrates how the Terminal class allows the user of `terminal_a`, on `computer_a`, to send a command to `computer_b` to install the `RansomwareScript` application. \n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -97,8 +111,23 @@
|
|||||||
" target_ip_address=computer_b.network_interface[1].ip_address,\n",
|
" target_ip_address=computer_b.network_interface[1].ip_address,\n",
|
||||||
")\n",
|
")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"terminal_a.send(payload=payload, dest_ip_address=computer_b.network_interface[1].ip_address)\n",
|
"# Send commmand to install RansomwareScript\n",
|
||||||
"\n",
|
"terminal_a.send(payload=payload, dest_ip_address=computer_b.network_interface[1].ip_address)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"The `RansomwareScript` can then be seen in the list of applications on the `node_b Software Manager`. "
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
"computer_b.software_manager.show()"
|
"computer_b.software_manager.show()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user