From cc5c728fe49ff2923236558e705737ce9a853182 Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Mon, 18 Sep 2017 18:06:00 +0300 Subject: [PATCH] Update linux run snippet Accessible by nodes use label now Exploit date is in simpler format now --- monkey_island/cc/services/node.py | 2 +- monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js | 2 +- .../cc/ui/src/components/preview-pane/PreviewPane.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/monkey_island/cc/services/node.py b/monkey_island/cc/services/node.py index 720bd06db..6494c5642 100644 --- a/monkey_island/cc/services/node.py +++ b/monkey_island/cc/services/node.py @@ -40,7 +40,7 @@ class NodeService: new_node["ip_addresses"] = node["ip_addresses"] for edge in edges: - accessible_from_nodes.append({"id": edge["from"]}) + accessible_from_nodes.append(NodeService.get_monkey_label(NodeService.get_monkey_by_id(edge["from"]))) for exploit in edge["exploits"]: exploit["origin"] = NodeService.get_monkey_label(NodeService.get_monkey_by_id(edge["from"])) exploits.append(exploit) diff --git a/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js b/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js index f125ddff1..4bbcd4e7d 100644 --- a/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js +++ b/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js @@ -32,7 +32,7 @@ class RunMonkeyPageComponent extends React.Component { generateLinuxCmd(ip, is32Bit) { let bitText = is32Bit ? '32' : '64'; - return `curl http://${ip}:5000/api/monkey/download/monkey-linux-${bitText} | sh`; + return `curl -O -k https://${ip}:5000/api/monkey/download/monkey-linux-${bitText}; chmod +x monkey-linux-${bitText}; ./monkey-linux-${bitText} m0nk3y -s ${ip}:5000` } generateWindowsCmd(ip, is32Bit) { diff --git a/monkey_island/cc/ui/src/components/preview-pane/PreviewPane.js b/monkey_island/cc/ui/src/components/preview-pane/PreviewPane.js index e8711dba4..a353714f2 100644 --- a/monkey_island/cc/ui/src/components/preview-pane/PreviewPane.js +++ b/monkey_island/cc/ui/src/components/preview-pane/PreviewPane.js @@ -21,7 +21,7 @@ class PreviewPaneComponent extends React.Component { Accessible From - {asset.accessible_from_nodes.map(val =>
{val.id}
)} + {asset.accessible_from_nodes.map(val =>
{val}
)} @@ -41,7 +41,7 @@ class PreviewPaneComponent extends React.Component { { asset.exploits.map(exploit =>
  • -
    {exploit.start_timestamp}
    +
    {new Date(exploit.start_timestamp).toLocaleString()}
    {exploit.origin}
    {exploit.exploiter}