Update linux run snippet

Accessible by nodes use label now
Exploit date is in simpler format now
This commit is contained in:
Itay Mizeretz 2017-09-18 18:06:00 +03:00
parent a35e96fc91
commit cc5c728fe4
3 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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) {

View File

@ -21,7 +21,7 @@ class PreviewPaneComponent extends React.Component {
</tr>
<tr>
<th>Accessible From</th>
<td>{asset.accessible_from_nodes.map(val => <div key={val.id}>{val.id}</div>)}</td>
<td>{asset.accessible_from_nodes.map(val => <div key={val}>{val}</div>)}</td>
</tr>
</tbody>
</table>
@ -41,7 +41,7 @@ class PreviewPaneComponent extends React.Component {
{ asset.exploits.map(exploit =>
<li key={exploit.start_timestamp}>
<div className={'bullet ' + (exploit.result ? 'bad' : '')}></div>
<div>{exploit.start_timestamp}</div>
<div>{new Date(exploit.start_timestamp).toLocaleString()}</div>
<div>{exploit.origin}</div>
<div>{exploit.exploiter}</div>
</li>