forked from p15670423/monkey
Fixing code style issues to lower linter warnings number
This commit is contained in:
parent
3607547aea
commit
d36ec06e91
|
@ -14,7 +14,7 @@ import ZeroTrustReportPage from 'components/pages/ZeroTrustReportPage';
|
||||||
import LicensePage from 'components/pages/LicensePage';
|
import LicensePage from 'components/pages/LicensePage';
|
||||||
import AuthComponent from 'components/AuthComponent';
|
import AuthComponent from 'components/AuthComponent';
|
||||||
import LoginPageComponent from 'components/pages/LoginPage';
|
import LoginPageComponent from 'components/pages/LoginPage';
|
||||||
import Notifier from "react-desktop-notification"
|
import Notifier from 'react-desktop-notification'
|
||||||
|
|
||||||
|
|
||||||
import 'normalize.css/normalize.css';
|
import 'normalize.css/normalize.css';
|
||||||
|
@ -22,7 +22,7 @@ import 'react-data-components/css/table-twbs.css';
|
||||||
import 'styles/App.css';
|
import 'styles/App.css';
|
||||||
import 'react-toggle/style.css';
|
import 'react-toggle/style.css';
|
||||||
import 'react-table/react-table.css';
|
import 'react-table/react-table.css';
|
||||||
import VersionComponent from "./side-menu/VersionComponent";
|
import VersionComponent from './side-menu/VersionComponent';
|
||||||
|
|
||||||
let logoImage = require('../images/monkey-icon.svg');
|
let logoImage = require('../images/monkey-icon.svg');
|
||||||
let infectionMonkeyImage = require('../images/infection-monkey.svg');
|
let infectionMonkeyImage = require('../images/infection-monkey.svg');
|
||||||
|
@ -63,7 +63,7 @@ class AppComponent extends AuthComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
renderRoute = (route_path, page_component, is_exact_path = false) => {
|
renderRoute = (route_path, page_component, is_exact_path = false) => {
|
||||||
let render_func = (props) => {
|
let render_func = () => {
|
||||||
switch (this.state.isLoggedIn) {
|
switch (this.state.isLoggedIn) {
|
||||||
case true:
|
case true:
|
||||||
return page_component;
|
return page_component;
|
||||||
|
@ -92,7 +92,7 @@ class AppComponent extends AuthComponent {
|
||||||
infection_done: false,
|
infection_done: false,
|
||||||
report_done: false,
|
report_done: false,
|
||||||
isLoggedIn: undefined
|
isLoggedIn: undefined
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ class AppComponent extends AuthComponent {
|
||||||
<VersionComponent/>
|
<VersionComponent/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col sm={9} md={10} smOffset={3} mdOffset={2} className="main">
|
<Col sm={9} md={10} smOffset={3} mdOffset={2} className="main">
|
||||||
<Route path='/login' render={(props) => (<LoginPageComponent onStatusChange={this.updateStatus}/>)}/>
|
<Route path='/login' render={() => (<LoginPageComponent onStatusChange={this.updateStatus}/>)}/>
|
||||||
{this.renderRoute('/', <RunServerPage onStatusChange={this.updateStatus}/>, true)}
|
{this.renderRoute('/', <RunServerPage onStatusChange={this.updateStatus}/>, true)}
|
||||||
{this.renderRoute('/configure', <ConfigurePage onStatusChange={this.updateStatus}/>)}
|
{this.renderRoute('/configure', <ConfigurePage onStatusChange={this.updateStatus}/>)}
|
||||||
{this.renderRoute('/run-monkey', <RunMonkeyPage onStatusChange={this.updateStatus}/>)}
|
{this.renderRoute('/run-monkey', <RunMonkeyPage onStatusChange={this.updateStatus}/>)}
|
||||||
|
@ -219,8 +219,8 @@ class AppComponent extends AuthComponent {
|
||||||
const url = `${protocol}//${hostname}:${port}${reportZeroTrustRoute}`;
|
const url = `${protocol}//${hostname}:${port}${reportZeroTrustRoute}`;
|
||||||
|
|
||||||
Notifier.start(
|
Notifier.start(
|
||||||
"Monkey Island",
|
'Monkey Island',
|
||||||
"Infection is done! Click here to go to the report page.",
|
'Infection is done! Click here to go to the report page.',
|
||||||
url,
|
url,
|
||||||
notificationIcon);
|
notificationIcon);
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ class AppComponent extends AuthComponent {
|
||||||
|
|
||||||
shouldShowNotification() {
|
shouldShowNotification() {
|
||||||
// No need to show the notification to redirect to the report if we're already in the report page
|
// No need to show the notification to redirect to the report if we're already in the report page
|
||||||
return (this.state.completedSteps.infection_done && !window.location.pathname.startsWith("/report"));
|
return (this.state.completedSteps.infection_done && !window.location.pathname.startsWith('/report'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,16 @@ import React from 'react';
|
||||||
import Checkbox from '../ui-components/Checkbox'
|
import Checkbox from '../ui-components/Checkbox'
|
||||||
import Tooltip from 'react-tooltip-lite'
|
import Tooltip from 'react-tooltip-lite'
|
||||||
import AuthComponent from '../AuthComponent';
|
import AuthComponent from '../AuthComponent';
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import 'filepond/dist/filepond.min.css';
|
import 'filepond/dist/filepond.min.css';
|
||||||
import '../../styles/Tooltip.scss';
|
import '../../styles/Tooltip.scss';
|
||||||
import {Col} from "react-bootstrap";
|
import {Col} from 'react-bootstrap';
|
||||||
|
|
||||||
class MatrixComponent extends AuthComponent {
|
class MatrixComponent extends AuthComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {lastAction: 'none'}
|
this.state = {lastAction: 'none'}
|
||||||
};
|
}
|
||||||
|
|
||||||
// Finds which attack type has most techniques and returns that number
|
// Finds which attack type has most techniques and returns that number
|
||||||
static findMaxTechniques(data) {
|
static findMaxTechniques(data) {
|
||||||
|
@ -22,7 +22,7 @@ class MatrixComponent extends AuthComponent {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return maxLen
|
return maxLen
|
||||||
};
|
}
|
||||||
|
|
||||||
// Parses ATT&CK config schema into data suitable for react-table (ATT&CK matrix)
|
// Parses ATT&CK config schema into data suitable for react-table (ATT&CK matrix)
|
||||||
static parseTechniques(data, maxLen) {
|
static parseTechniques(data, maxLen) {
|
||||||
|
@ -47,7 +47,7 @@ class MatrixComponent extends AuthComponent {
|
||||||
techniques.push(row)
|
techniques.push(row)
|
||||||
}
|
}
|
||||||
return techniques;
|
return techniques;
|
||||||
};
|
}
|
||||||
|
|
||||||
getColumns(matrixData) {
|
getColumns(matrixData) {
|
||||||
return Object.keys(matrixData[0]).map((key) => {
|
return Object.keys(matrixData[0]).map((key) => {
|
||||||
|
@ -73,7 +73,7 @@ class MatrixComponent extends AuthComponent {
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
</Tooltip>)
|
</Tooltip>)
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
getTableData = (config) => {
|
getTableData = (config) => {
|
||||||
let configCopy = JSON.parse(JSON.stringify(config));
|
let configCopy = JSON.parse(JSON.stringify(config));
|
||||||
|
@ -106,7 +106,7 @@ class MatrixComponent extends AuthComponent {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{this.renderLegend()}
|
{this.renderLegend()}
|
||||||
<div className={"attack-matrix"}>
|
<div className={'attack-matrix'}>
|
||||||
<ReactTable columns={tableData['columns']}
|
<ReactTable columns={tableData['columns']}
|
||||||
data={tableData['matrixTableData']}
|
data={tableData['matrixTableData']}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
import React from "react";
|
import React from 'react';
|
||||||
|
|
||||||
export function renderMachine(val) {
|
export function renderMachine(val) {
|
||||||
return (
|
return (
|
||||||
<span>{val.ip_addr} {(val.domain_name ? " (".concat(val.domain_name, ")") : "")}</span>
|
<span>{val.ip_addr} {(val.domain_name ? ' ('.concat(val.domain_name, ')') : '')}</span>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function takes data gathered from system info collector and creates a
|
/* Function takes data gathered from system info collector and creates a
|
||||||
string representation of machine from that data. */
|
string representation of machine from that data. */
|
||||||
export function renderMachineFromSystemData(data) {
|
export function renderMachineFromSystemData(data) {
|
||||||
let machineStr = data['hostname'] + " ( ";
|
let machineStr = data['hostname'] + ' ( ';
|
||||||
data['ips'].forEach(function (ipInfo) {
|
data['ips'].forEach(function (ipInfo) {
|
||||||
if (typeof ipInfo === "object") {
|
if (typeof ipInfo === 'object') {
|
||||||
machineStr += ipInfo['addr'] + ", ";
|
machineStr += ipInfo['addr'] + ', ';
|
||||||
} else {
|
} else {
|
||||||
machineStr += ipInfo + ", ";
|
machineStr += ipInfo + ', ';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Replaces " ," with " )" to finish a list of IP's
|
// Replaces " ," with " )" to finish a list of IP's
|
||||||
return machineStr.slice(0, -2) + " )"
|
return machineStr.slice(0, -2) + ' )'
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Formats telemetry data that contains _id.machine and _id.usage fields into columns
|
/* Formats telemetry data that contains _id.machine and _id.usage fields into columns
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import '../../report-components/security/StolenPasswords'
|
import '../../report-components/security/StolenPasswords'
|
||||||
import StolenPasswordsComponent from "../../report-components/security/StolenPasswords";
|
import StolenPasswordsComponent from '../../report-components/security/StolenPasswords';
|
||||||
import {ScanStatus} from "./Helpers"
|
import {ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1003 extends React.Component {
|
class T1003 extends React.Component {
|
||||||
|
@ -19,7 +19,7 @@ class T1003 extends React.Component {
|
||||||
{this.props.data.status === ScanStatus.USED ?
|
{this.props.data.status === ScanStatus.USED ?
|
||||||
<StolenPasswordsComponent
|
<StolenPasswordsComponent
|
||||||
data={this.props.reportData.glance.stolen_creds.concat(this.props.reportData.glance.ssh_keys)}/>
|
data={this.props.reportData.glance.stolen_creds.concat(this.props.reportData.glance.ssh_keys)}/>
|
||||||
: ""}
|
: ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachineFromSystemData, ScanStatus} from "./Helpers";
|
import {renderMachineFromSystemData, ScanStatus} from './Helpers';
|
||||||
|
|
||||||
class T1005 extends React.Component {
|
class T1005 extends React.Component {
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ class T1005 extends React.Component {
|
||||||
|
|
||||||
static getDataColumns() {
|
static getDataColumns() {
|
||||||
return ([{
|
return ([{
|
||||||
Header: "Sensitive data",
|
Header: 'Sensitive data',
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
Header: 'Machine',
|
Header: 'Machine',
|
||||||
|
@ -20,10 +20,10 @@ class T1005 extends React.Component {
|
||||||
style: {'whiteSpace': 'unset'}
|
style: {'whiteSpace': 'unset'}
|
||||||
},
|
},
|
||||||
{Header: 'Type', id: 'type', accessor: x => x.gathered_data_type, style: {'whiteSpace': 'unset'}},
|
{Header: 'Type', id: 'type', accessor: x => x.gathered_data_type, style: {'whiteSpace': 'unset'}},
|
||||||
{Header: 'Info', id: 'info', accessor: x => x.info, style: {'whiteSpace': 'unset'}},
|
{Header: 'Info', id: 'info', accessor: x => x.info, style: {'whiteSpace': 'unset'}}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -36,7 +36,7 @@ class T1005 extends React.Component {
|
||||||
data={this.props.data.collected_data}
|
data={this.props.data.collected_data}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.collected_data.length}
|
defaultPageSize={this.props.data.collected_data.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachineFromSystemData, renderUsageFields, ScanStatus} from "./Helpers"
|
import {renderMachineFromSystemData, renderUsageFields, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1016 extends React.Component {
|
class T1016 extends React.Component {
|
||||||
|
@ -12,7 +12,7 @@ class T1016 extends React.Component {
|
||||||
|
|
||||||
static getNetworkInfoColumns() {
|
static getNetworkInfoColumns() {
|
||||||
return ([{
|
return ([{
|
||||||
Header: "Network configuration info gathered",
|
Header: 'Network configuration info gathered',
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
Header: 'Machine',
|
Header: 'Machine',
|
||||||
|
@ -20,10 +20,10 @@ class T1016 extends React.Component {
|
||||||
accessor: x => renderMachineFromSystemData(x.machine),
|
accessor: x => renderMachineFromSystemData(x.machine),
|
||||||
style: {'whiteSpace': 'unset'}
|
style: {'whiteSpace': 'unset'}
|
||||||
},
|
},
|
||||||
{Header: 'Network info', id: 'info', accessor: x => renderUsageFields(x.info), style: {'whiteSpace': 'unset'}},
|
{Header: 'Network info', id: 'info', accessor: x => renderUsageFields(x.info), style: {'whiteSpace': 'unset'}}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -36,7 +36,7 @@ class T1016 extends React.Component {
|
||||||
data={this.props.data.network_info}
|
data={this.props.data.network_info}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.network_info.length}
|
defaultPageSize={this.props.data.network_info.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachineFromSystemData, renderMachine, ScanStatus} from "./Helpers"
|
import {renderMachineFromSystemData, renderMachine, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1018 extends React.Component {
|
class T1018 extends React.Component {
|
||||||
|
@ -34,10 +34,10 @@ class T1018 extends React.Component {
|
||||||
id: 'systems',
|
id: 'systems',
|
||||||
accessor: x => T1018.renderMachines(x.machines),
|
accessor: x => T1018.renderMachines(x.machines),
|
||||||
style: {'whiteSpace': 'unset'}
|
style: {'whiteSpace': 'unset'}
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -50,7 +50,7 @@ class T1018 extends React.Component {
|
||||||
data={this.props.data.scan_info}
|
data={this.props.data.scan_info}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.scan_info.length}
|
defaultPageSize={this.props.data.scan_info.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachine, ScanStatus} from "./Helpers"
|
import {renderMachine, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1021 extends React.Component {
|
class T1021 extends React.Component {
|
||||||
|
@ -23,14 +23,14 @@ class T1021 extends React.Component {
|
||||||
id: 'credentials',
|
id: 'credentials',
|
||||||
accessor: x => this.renderCreds(x.successful_creds),
|
accessor: x => this.renderCreds(x.successful_creds),
|
||||||
style: {'whiteSpace': 'unset'}
|
style: {'whiteSpace': 'unset'}
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
static renderCreds(creds) {
|
static renderCreds(creds) {
|
||||||
return <span>{creds.map(cred => <div key={cred}>{cred}</div>)}</span>
|
return <span>{creds.map(cred => <div key={cred}>{cred}</div>)}</span>
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -43,7 +43,7 @@ class T1021 extends React.Component {
|
||||||
data={this.props.data.services}
|
data={this.props.data.services}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.services.length}
|
defaultPageSize={this.props.data.services.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {getUsageColumns} from "./Helpers"
|
import {getUsageColumns} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1035 extends React.Component {
|
class T1035 extends React.Component {
|
||||||
|
@ -21,7 +21,7 @@ class T1035 extends React.Component {
|
||||||
data={this.props.data.services}
|
data={this.props.data.services}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.services.length}
|
defaultPageSize={this.props.data.services.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {ScanStatus} from "./Helpers";
|
import {ScanStatus} from './Helpers';
|
||||||
|
|
||||||
class T1041 extends React.Component {
|
class T1041 extends React.Component {
|
||||||
|
|
||||||
|
@ -11,13 +11,13 @@ class T1041 extends React.Component {
|
||||||
|
|
||||||
static getC2Columns() {
|
static getC2Columns() {
|
||||||
return ([{
|
return ([{
|
||||||
Header: "Data exfiltration channels",
|
Header: 'Data exfiltration channels',
|
||||||
columns: [
|
columns: [
|
||||||
{Header: 'Source', id: 'src', accessor: x => x.src, style: {'whiteSpace': 'unset'}},
|
{Header: 'Source', id: 'src', accessor: x => x.src, style: {'whiteSpace': 'unset'}},
|
||||||
{Header: 'Destination', id: 'dst', accessor: x => x.dst, style: {'whiteSpace': 'unset'}}
|
{Header: 'Destination', id: 'dst', accessor: x => x.dst, style: {'whiteSpace': 'unset'}}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -30,7 +30,7 @@ class T1041 extends React.Component {
|
||||||
data={this.props.data.command_control_channel}
|
data={this.props.data.command_control_channel}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.command_control_channel.length}
|
defaultPageSize={this.props.data.command_control_channel.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachine, ScanStatus} from "./Helpers"
|
import {renderMachine, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1059 extends React.Component {
|
class T1059 extends React.Component {
|
||||||
|
@ -22,10 +22,10 @@ class T1059 extends React.Component {
|
||||||
width: 160
|
width: 160
|
||||||
},
|
},
|
||||||
{Header: 'Approx. Time', id: 'time', accessor: x => x.data.info.finished, style: {'whiteSpace': 'unset'}},
|
{Header: 'Approx. Time', id: 'time', accessor: x => x.data.info.finished, style: {'whiteSpace': 'unset'}},
|
||||||
{Header: 'Command', id: 'command', accessor: x => x.data.info.executed_cmds.cmd, style: {'whiteSpace': 'unset'}},
|
{Header: 'Command', id: 'command', accessor: x => x.data.info.executed_cmds.cmd, style: {'whiteSpace': 'unset'}}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -38,7 +38,7 @@ class T1059 extends React.Component {
|
||||||
data={this.props.data.cmds}
|
data={this.props.data.cmds}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.cmds.length}
|
defaultPageSize={this.props.data.cmds.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {getUsageColumns} from "./Helpers"
|
import {getUsageColumns} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1064 extends React.Component {
|
class T1064 extends React.Component {
|
||||||
|
@ -21,7 +21,7 @@ class T1064 extends React.Component {
|
||||||
data={this.props.data.scripts}
|
data={this.props.data.scripts}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.scripts.length}
|
defaultPageSize={this.props.data.scripts.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachine, ScanStatus} from "./Helpers"
|
import {renderMachine, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1075 extends React.Component {
|
class T1075 extends React.Component {
|
||||||
|
@ -12,9 +12,9 @@ class T1075 extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
setLoginHashType(login) {
|
setLoginHashType(login) {
|
||||||
if (login.attempts[0].ntlm_hash !== "") {
|
if (login.attempts[0].ntlm_hash !== '') {
|
||||||
login.attempts[0].hashType = 'NTLM';
|
login.attempts[0].hashType = 'NTLM';
|
||||||
} else if (login.attempts[0].lm_hash !== "") {
|
} else if (login.attempts[0].lm_hash !== '') {
|
||||||
login.attempts[0].hashType = 'LM';
|
login.attempts[0].hashType = 'LM';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,10 @@ class T1075 extends React.Component {
|
||||||
{Header: 'Machine', id: 'machine', accessor: x => renderMachine(x.machine), style: {'whiteSpace': 'unset'}},
|
{Header: 'Machine', id: 'machine', accessor: x => renderMachine(x.machine), style: {'whiteSpace': 'unset'}},
|
||||||
{Header: 'Service', id: 'service', accessor: x => x.info.display_name, style: {'whiteSpace': 'unset'}},
|
{Header: 'Service', id: 'service', accessor: x => x.info.display_name, style: {'whiteSpace': 'unset'}},
|
||||||
{Header: 'Username', id: 'username', accessor: x => x.attempts[0].user, style: {'whiteSpace': 'unset'}},
|
{Header: 'Username', id: 'username', accessor: x => x.attempts[0].user, style: {'whiteSpace': 'unset'}},
|
||||||
{Header: 'Hash type', id: 'hash', accessor: x => x.attempts[0].hashType, style: {'whiteSpace': 'unset'}},
|
{Header: 'Hash type', id: 'hash', accessor: x => x.attempts[0].hashType, style: {'whiteSpace': 'unset'}}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -41,7 +41,7 @@ class T1075 extends React.Component {
|
||||||
data={this.props.data.successful_logins}
|
data={this.props.data.successful_logins}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.successful_logins.length}
|
defaultPageSize={this.props.data.successful_logins.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachineFromSystemData, renderUsageFields, ScanStatus} from "./Helpers"
|
import {renderMachineFromSystemData, renderUsageFields, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1082 extends React.Component {
|
class T1082 extends React.Component {
|
||||||
|
@ -19,10 +19,10 @@ class T1082 extends React.Component {
|
||||||
accessor: x => renderMachineFromSystemData(x.machine),
|
accessor: x => renderMachineFromSystemData(x.machine),
|
||||||
style: {'whiteSpace': 'unset'}
|
style: {'whiteSpace': 'unset'}
|
||||||
},
|
},
|
||||||
{Header: 'Gathered info', id: 'info', accessor: x => renderUsageFields(x.collections), style: {'whiteSpace': 'unset'}},
|
{Header: 'Gathered info', id: 'info', accessor: x => renderUsageFields(x.collections), style: {'whiteSpace': 'unset'}}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -35,7 +35,7 @@ class T1082 extends React.Component {
|
||||||
data={this.props.data.system_info}
|
data={this.props.data.system_info}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.system_info.length}
|
defaultPageSize={this.props.data.system_info.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachine, ScanStatus} from "./Helpers"
|
import {renderMachine, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1086 extends React.Component {
|
class T1086 extends React.Component {
|
||||||
|
@ -22,10 +22,10 @@ class T1086 extends React.Component {
|
||||||
width: 160
|
width: 160
|
||||||
},
|
},
|
||||||
{Header: 'Approx. Time', id: 'time', accessor: x => x.data[0].info.finished, style: {'whiteSpace': 'unset'}},
|
{Header: 'Approx. Time', id: 'time', accessor: x => x.data[0].info.finished, style: {'whiteSpace': 'unset'}},
|
||||||
{Header: 'Command', id: 'command', accessor: x => x.data[0].info.executed_cmds[0].cmd, style: {'whiteSpace': 'unset'}},
|
{Header: 'Command', id: 'command', accessor: x => x.data[0].info.executed_cmds[0].cmd, style: {'whiteSpace': 'unset'}}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -38,7 +38,7 @@ class T1086 extends React.Component {
|
||||||
data={this.props.data.cmds}
|
data={this.props.data.cmds}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.cmds.length}
|
defaultPageSize={this.props.data.cmds.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachineFromSystemData, ScanStatus} from "./Helpers"
|
import {renderMachineFromSystemData, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1090 extends React.Component {
|
class T1090 extends React.Component {
|
||||||
|
@ -20,7 +20,7 @@ class T1090 extends React.Component {
|
||||||
style: {'whiteSpace': 'unset', textAlign: 'center'}
|
style: {'whiteSpace': 'unset', textAlign: 'center'}
|
||||||
}]
|
}]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -33,7 +33,7 @@ class T1090 extends React.Component {
|
||||||
data={this.props.data.proxies}
|
data={this.props.data.proxies}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.proxies.length}
|
defaultPageSize={this.props.data.proxies.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {ScanStatus} from "./Helpers"
|
import {ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1105 extends React.Component {
|
class T1105 extends React.Component {
|
||||||
|
@ -16,10 +16,10 @@ class T1105 extends React.Component {
|
||||||
columns: [
|
columns: [
|
||||||
{Header: 'Src. Machine', id: 'srcMachine', accessor: x => x.src, style: {'whiteSpace': 'unset'}, width: 170},
|
{Header: 'Src. Machine', id: 'srcMachine', accessor: x => x.src, style: {'whiteSpace': 'unset'}, width: 170},
|
||||||
{Header: 'Dst. Machine', id: 'dstMachine', accessor: x => x.dst, style: {'whiteSpace': 'unset'}, width: 170},
|
{Header: 'Dst. Machine', id: 'dstMachine', accessor: x => x.dst, style: {'whiteSpace': 'unset'}, width: 170},
|
||||||
{Header: 'Filename', id: 'filename', accessor: x => x.filename, style: {'whiteSpace': 'unset'}},
|
{Header: 'Filename', id: 'filename', accessor: x => x.filename, style: {'whiteSpace': 'unset'}}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -32,7 +32,7 @@ class T1105 extends React.Component {
|
||||||
data={this.props.data.files}
|
data={this.props.data.files}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.files.length}
|
defaultPageSize={this.props.data.files.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {getUsageColumns} from "./Helpers"
|
import {getUsageColumns} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1106 extends React.Component {
|
class T1106 extends React.Component {
|
||||||
|
@ -21,7 +21,7 @@ class T1106 extends React.Component {
|
||||||
data={this.props.data.api_uses}
|
data={this.props.data.api_uses}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.api_uses.length}
|
defaultPageSize={this.props.data.api_uses.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachineFromSystemData, ScanStatus} from "./Helpers"
|
import {renderMachineFromSystemData, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1107 extends React.Component {
|
class T1107 extends React.Component {
|
||||||
|
@ -33,7 +33,7 @@ class T1107 extends React.Component {
|
||||||
style: {'whiteSpace': 'unset'}, width: 160
|
style: {'whiteSpace': 'unset'}, width: 160
|
||||||
}]
|
}]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -46,7 +46,7 @@ class T1107 extends React.Component {
|
||||||
data={this.props.data.deleted_files}
|
data={this.props.data.deleted_files}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.deleted_files.length}
|
defaultPageSize={this.props.data.deleted_files.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachine, ScanStatus} from "./Helpers"
|
import {renderMachine, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1110 extends React.Component {
|
class T1110 extends React.Component {
|
||||||
|
@ -26,14 +26,14 @@ class T1110 extends React.Component {
|
||||||
id: 'credentials',
|
id: 'credentials',
|
||||||
accessor: x => this.renderCreds(x.successful_creds),
|
accessor: x => this.renderCreds(x.successful_creds),
|
||||||
style: {'whiteSpace': 'unset'}
|
style: {'whiteSpace': 'unset'}
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
static renderCreds(creds) {
|
static renderCreds(creds) {
|
||||||
return <span>{creds.map(cred => <div key={cred}>{cred}</div>)}</span>
|
return <span>{creds.map(cred => <div key={cred}>{cred}</div>)}</span>
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -46,7 +46,7 @@ class T1110 extends React.Component {
|
||||||
data={this.props.data.services}
|
data={this.props.data.services}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.services.length}
|
defaultPageSize={this.props.data.services.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {getUsageColumns} from "./Helpers";
|
import {getUsageColumns} from './Helpers';
|
||||||
|
|
||||||
class T1129 extends React.Component {
|
class T1129 extends React.Component {
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ class T1129 extends React.Component {
|
||||||
data={this.props.data.dlls}
|
data={this.props.data.dlls}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.dlls.length}
|
defaultPageSize={this.props.data.dlls.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachineFromSystemData, ScanStatus} from "./Helpers"
|
import {renderMachineFromSystemData, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1145 extends React.Component {
|
class T1145 extends React.Component {
|
||||||
|
@ -33,10 +33,10 @@ class T1145 extends React.Component {
|
||||||
id: 'keys',
|
id: 'keys',
|
||||||
accessor: x => T1145.renderSSHKeys(x.ssh_info),
|
accessor: x => T1145.renderSSHKeys(x.ssh_info),
|
||||||
style: {'whiteSpace': 'unset'}
|
style: {'whiteSpace': 'unset'}
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -49,7 +49,7 @@ class T1145 extends React.Component {
|
||||||
data={this.props.data.ssh_info}
|
data={this.props.data.ssh_info}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.ssh_info.length}
|
defaultPageSize={this.props.data.ssh_info.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachineFromSystemData, ScanStatus} from "./Helpers"
|
import {renderMachineFromSystemData, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1188 extends React.Component {
|
class T1188 extends React.Component {
|
||||||
|
@ -12,7 +12,7 @@ class T1188 extends React.Component {
|
||||||
|
|
||||||
static getHopColumns() {
|
static getHopColumns() {
|
||||||
return ([{
|
return ([{
|
||||||
Header: "Communications through multi-hop proxies",
|
Header: 'Communications through multi-hop proxies',
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
Header: 'From',
|
Header: 'From',
|
||||||
|
@ -31,10 +31,10 @@ class T1188 extends React.Component {
|
||||||
id: 'hops',
|
id: 'hops',
|
||||||
accessor: x => x.count,
|
accessor: x => x.count,
|
||||||
style: {'whiteSpace': 'unset'}
|
style: {'whiteSpace': 'unset'}
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -47,7 +47,7 @@ class T1188 extends React.Component {
|
||||||
data={this.props.data.hops}
|
data={this.props.data.hops}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.hops.length}
|
defaultPageSize={this.props.data.hops.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachine} from "./Helpers"
|
import {renderMachine} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1210 extends React.Component {
|
class T1210 extends React.Component {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachine} from "./Helpers"
|
import {renderMachine} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1210 extends React.Component {
|
class T1210 extends React.Component {
|
||||||
|
@ -12,7 +12,7 @@ class T1210 extends React.Component {
|
||||||
|
|
||||||
static getScanColumns() {
|
static getScanColumns() {
|
||||||
return ([{
|
return ([{
|
||||||
Header: "Found services",
|
Header: 'Found services',
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
Header: 'Machine', id: 'machine', accessor: x => renderMachine(x.machine),
|
Header: 'Machine', id: 'machine', accessor: x => renderMachine(x.machine),
|
||||||
|
@ -27,7 +27,7 @@ class T1210 extends React.Component {
|
||||||
|
|
||||||
static getExploitColumns() {
|
static getExploitColumns() {
|
||||||
return ([{
|
return ([{
|
||||||
Header: "Exploited services",
|
Header: 'Exploited services',
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
Header: 'Machine', id: 'machine', accessor: x => renderMachine(x.machine),
|
Header: 'Machine', id: 'machine', accessor: x => renderMachine(x.machine),
|
||||||
|
@ -41,13 +41,13 @@ class T1210 extends React.Component {
|
||||||
{Header: 'Service', id: 'service', accessor: x => x.service.display_name, style: {'whiteSpace': 'unset'}}
|
{Header: 'Service', id: 'service', accessor: x => x.service.display_name, style: {'whiteSpace': 'unset'}}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
static renderEndpoint(val) {
|
static renderEndpoint(val) {
|
||||||
return (
|
return (
|
||||||
<span>{(val.vulnerable_urls.length !== 0 ? val.vulnerable_urls[0] : val.vulnerable_ports[0])}</span>
|
<span>{(val.vulnerable_urls.length !== 0 ? val.vulnerable_urls[0] : val.vulnerable_ports[0])}</span>
|
||||||
)
|
)
|
||||||
};
|
}
|
||||||
|
|
||||||
static formatScanned(data) {
|
static formatScanned(data) {
|
||||||
let result = [];
|
let result = [];
|
||||||
|
@ -63,7 +63,7 @@ class T1210 extends React.Component {
|
||||||
result.push(scanned_service)
|
result.push(scanned_service)
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
};
|
}
|
||||||
|
|
||||||
renderScannedServices(data) {
|
renderScannedServices(data) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../../../styles/Collapse.scss'
|
import '../../../styles/Collapse.scss'
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import {renderMachine, ScanStatus} from "./Helpers"
|
import {renderMachine, ScanStatus} from './Helpers'
|
||||||
|
|
||||||
|
|
||||||
class T1222 extends React.Component {
|
class T1222 extends React.Component {
|
||||||
|
@ -12,13 +12,13 @@ class T1222 extends React.Component {
|
||||||
|
|
||||||
static getCommandColumns() {
|
static getCommandColumns() {
|
||||||
return ([{
|
return ([{
|
||||||
Header: "Permission modification commands",
|
Header: 'Permission modification commands',
|
||||||
columns: [
|
columns: [
|
||||||
{Header: 'Machine', id: 'machine', accessor: x => renderMachine(x.machine), style: {'whiteSpace': 'unset'}},
|
{Header: 'Machine', id: 'machine', accessor: x => renderMachine(x.machine), style: {'whiteSpace': 'unset'}},
|
||||||
{Header: 'Command', id: 'command', accessor: x => x.command, style: {'whiteSpace': 'unset'}},
|
{Header: 'Command', id: 'command', accessor: x => x.command, style: {'whiteSpace': 'unset'}}
|
||||||
]
|
]
|
||||||
}])
|
}])
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -31,7 +31,7 @@ class T1222 extends React.Component {
|
||||||
data={this.props.data.commands}
|
data={this.props.data.commands}
|
||||||
showPagination={false}
|
showPagination={false}
|
||||||
defaultPageSize={this.props.data.commands.length}
|
defaultPageSize={this.props.data.commands.length}
|
||||||
/> : ""}
|
/> : ''}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,14 +84,14 @@ class InfMapPreviewPaneComponent extends PreviewPaneComponent {
|
||||||
|
|
||||||
unescapeLog(st) {
|
unescapeLog(st) {
|
||||||
return st.substr(1, st.length - 2) // remove quotation marks on beginning and end of string.
|
return st.substr(1, st.length - 2) // remove quotation marks on beginning and end of string.
|
||||||
.replace(/\\n/g, "\n")
|
.replace(/\\n/g, '\n')
|
||||||
.replace(/\\r/g, "\r")
|
.replace(/\\r/g, '\r')
|
||||||
.replace(/\\t/g, "\t")
|
.replace(/\\t/g, '\t')
|
||||||
.replace(/\\b/g, "\b")
|
.replace(/\\b/g, '\b')
|
||||||
.replace(/\\f/g, "\f")
|
.replace(/\\f/g, '\f')
|
||||||
.replace(/\\"/g, '\"')
|
.replace(/\\"/g, '\"')
|
||||||
.replace(/\\'/g, "\'")
|
.replace(/\\'/g, '\'')
|
||||||
.replace(/\\&/g, "\&");
|
.replace(/\\&/g, '\&');
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadLog(asset) {
|
downloadLog(asset) {
|
||||||
|
|
|
@ -92,14 +92,14 @@ class PreviewPaneComponent extends AuthComponent {
|
||||||
|
|
||||||
unescapeLog(st) {
|
unescapeLog(st) {
|
||||||
return st.substr(1, st.length - 2) // remove quotation marks on beginning and end of string.
|
return st.substr(1, st.length - 2) // remove quotation marks on beginning and end of string.
|
||||||
.replace(/\\n/g, "\n")
|
.replace(/\\n/g, '\n')
|
||||||
.replace(/\\r/g, "\r")
|
.replace(/\\r/g, '\r')
|
||||||
.replace(/\\t/g, "\t")
|
.replace(/\\t/g, '\t')
|
||||||
.replace(/\\b/g, "\b")
|
.replace(/\\b/g, '\b')
|
||||||
.replace(/\\f/g, "\f")
|
.replace(/\\f/g, '\f')
|
||||||
.replace(/\\"/g, '\"')
|
.replace(/\\"/g, '\"')
|
||||||
.replace(/\\'/g, "\'")
|
.replace(/\\'/g, '\'')
|
||||||
.replace(/\\&/g, "\&");
|
.replace(/\\&/g, '\&');
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadLog(asset) {
|
downloadLog(asset) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import FileSaver from 'file-saver';
|
||||||
import AuthComponent from '../AuthComponent';
|
import AuthComponent from '../AuthComponent';
|
||||||
import {FilePond} from 'react-filepond';
|
import {FilePond} from 'react-filepond';
|
||||||
import 'filepond/dist/filepond.min.css';
|
import 'filepond/dist/filepond.min.css';
|
||||||
import MatrixComponent from "../attack/MatrixComponent";
|
import MatrixComponent from '../attack/MatrixComponent';
|
||||||
|
|
||||||
const ATTACK_URL = '/api/attack';
|
const ATTACK_URL = '/api/attack';
|
||||||
const CONFIG_URL = '/api/configuration/island';
|
const CONFIG_URL = '/api/configuration/island';
|
||||||
|
@ -39,31 +39,31 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
|
|
||||||
getUiSchemas() {
|
getUiSchemas() {
|
||||||
return ({
|
return ({
|
||||||
basic: {"ui:order": ["general", "credentials"]},
|
basic: {'ui:order': ['general', 'credentials']},
|
||||||
basic_network: {},
|
basic_network: {},
|
||||||
monkey: {
|
monkey: {
|
||||||
behaviour: {
|
behaviour: {
|
||||||
custom_PBA_linux_cmd: {
|
custom_PBA_linux_cmd: {
|
||||||
"ui:widget": "textarea",
|
'ui:widget': 'textarea',
|
||||||
"ui:emptyValue": ""
|
'ui:emptyValue': ''
|
||||||
},
|
},
|
||||||
PBA_linux_file: {
|
PBA_linux_file: {
|
||||||
"ui:widget": this.PBAlinux
|
'ui:widget': this.PBAlinux
|
||||||
},
|
},
|
||||||
custom_PBA_windows_cmd: {
|
custom_PBA_windows_cmd: {
|
||||||
"ui:widget": "textarea",
|
'ui:widget': 'textarea',
|
||||||
"ui:emptyValue": ""
|
'ui:emptyValue': ''
|
||||||
},
|
},
|
||||||
PBA_windows_file: {
|
PBA_windows_file: {
|
||||||
"ui:widget": this.PBAwindows
|
'ui:widget': this.PBAwindows
|
||||||
},
|
},
|
||||||
PBA_linux_filename: {
|
PBA_linux_filename: {
|
||||||
classNames: "linux-pba-file-info",
|
classNames: 'linux-pba-file-info',
|
||||||
"ui:emptyValue": ""
|
'ui:emptyValue': ''
|
||||||
},
|
},
|
||||||
PBA_windows_filename: {
|
PBA_windows_filename: {
|
||||||
classNames: "windows-pba-file-info",
|
classNames: 'windows-pba-file-info',
|
||||||
"ui:emptyValue": ""
|
'ui:emptyValue': ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -95,7 +95,7 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
this.setInitialAttackConfig(attackConfig.configuration);
|
this.setInitialAttackConfig(attackConfig.configuration);
|
||||||
for (let sectionKey of this.sectionsOrder) {
|
for (let sectionKey of this.sectionsOrder) {
|
||||||
if (sectionKey === 'attack') {
|
if (sectionKey === 'attack') {
|
||||||
sections.push({key: sectionKey, title: "ATT&CK"})
|
sections.push({key: sectionKey, title: 'ATT&CK'})
|
||||||
} else {
|
} else {
|
||||||
sections.push({key: sectionKey, title: monkeyConfig.schema.properties[sectionKey].title});
|
sections.push({key: sectionKey, title: monkeyConfig.schema.properties[sectionKey].title});
|
||||||
}
|
}
|
||||||
|
@ -148,6 +148,7 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
.then(this.updateConfig())
|
.then(this.updateConfig())
|
||||||
.then(this.setState({lastAction: 'saved'}))
|
.then(this.setState({lastAction: 'saved'}))
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
console.log('Bad configuration: ' + error.toString());
|
||||||
this.setState({lastAction: 'invalid_configuration'});
|
this.setState({lastAction: 'invalid_configuration'});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -166,8 +167,8 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
this.setInitialConfig(res.configuration);
|
this.setInitialConfig(res.configuration);
|
||||||
this.props.onStatusChange();
|
this.props.onStatusChange();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log('bad configuration');
|
console.log('Bad configuration: ' + error.toString());
|
||||||
this.setState({lastAction: 'invalid_configuration'});
|
this.setState({lastAction: 'invalid_configuration'});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -327,8 +328,8 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
exportConfig = () => {
|
exportConfig = () => {
|
||||||
this.updateConfigSection();
|
this.updateConfigSection();
|
||||||
const configAsJson = JSON.stringify(this.state.configuration, null, 2);
|
const configAsJson = JSON.stringify(this.state.configuration, null, 2);
|
||||||
const configAsBinary = new Blob([configAsJson], {type: "text/plain;charset=utf-8"});
|
const configAsBinary = new Blob([configAsJson], {type: 'text/plain;charset=utf-8'});
|
||||||
|
|
||||||
FileSaver.saveAs(configAsBinary, 'monkey.conf');
|
FileSaver.saveAs(configAsBinary, 'monkey.conf');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -349,7 +350,7 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
console.log('bad configuration');
|
console.log('bad configuration');
|
||||||
this.setState({lastAction: 'invalid_configuration'});
|
this.setState({lastAction: 'invalid_configuration'});
|
||||||
}));
|
}));
|
||||||
};
|
}
|
||||||
|
|
||||||
importConfig = (event) => {
|
importConfig = (event) => {
|
||||||
let reader = new FileReader();
|
let reader = new FileReader();
|
||||||
|
@ -464,7 +465,7 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
formData={this.state.configuration[this.state.selectedSection]}
|
formData={this.state.configuration[this.state.selectedSection]}
|
||||||
onChange={this.onChange}
|
onChange={this.onChange}
|
||||||
noValidate={true}>
|
noValidate={true}>
|
||||||
<button type="submit" className={"hidden"}>Submit</button>
|
<button type="submit" className={'hidden'}>Submit</button>
|
||||||
</Form>
|
</Form>
|
||||||
</div>)
|
</div>)
|
||||||
};
|
};
|
||||||
|
|
|
@ -43,7 +43,7 @@ class MapPageComponent extends AuthComponent {
|
||||||
this.authFetch('/api/netmap')
|
this.authFetch('/api/netmap')
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.hasOwnProperty("edges")) {
|
if (res.hasOwnProperty('edges')) {
|
||||||
res.edges.forEach(edge => {
|
res.edges.forEach(edge => {
|
||||||
edge.color = {'color': edgeGroupToColor(edge.group)};
|
edge.color = {'color': edgeGroupToColor(edge.group)};
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {ReactiveGraph} from 'components/reactive-graph/ReactiveGraph';
|
import {ReactiveGraph} from 'components/reactive-graph/ReactiveGraph';
|
||||||
import AuthComponent from '../AuthComponent';
|
import AuthComponent from '../AuthComponent';
|
||||||
import {optionsPth, edgeGroupToColorPth, options} from '../map/MapOptions';
|
import {optionsPth} from '../map/MapOptions';
|
||||||
import PreviewPane from "../map/preview-pane/PreviewPane";
|
import {Col} from 'react-bootstrap';
|
||||||
import {Col} from "react-bootstrap";
|
|
||||||
import {Link} from 'react-router-dom';
|
|
||||||
import {Icon} from 'react-fa';
|
|
||||||
import PthPreviewPaneComponent from "../map/preview-pane/PthPreviewPane";
|
|
||||||
|
|
||||||
class PassTheHashMapPageComponent extends AuthComponent {
|
class PassTheHashMapPageComponent extends AuthComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
|
@ -9,16 +9,16 @@ import StolenPasswords from 'components/report-components/security/StolenPasswor
|
||||||
import CollapsibleWellComponent from 'components/report-components/security/CollapsibleWell';
|
import CollapsibleWellComponent from 'components/report-components/security/CollapsibleWell';
|
||||||
import {Line} from 'rc-progress';
|
import {Line} from 'rc-progress';
|
||||||
import AuthComponent from '../AuthComponent';
|
import AuthComponent from '../AuthComponent';
|
||||||
import PassTheHashMapPageComponent from "./PassTheHashMapPage";
|
import PassTheHashMapPageComponent from './PassTheHashMapPage';
|
||||||
import StrongUsers from "components/report-components/security/StrongUsers";
|
import StrongUsers from 'components/report-components/security/StrongUsers';
|
||||||
import AttackReport from "components/report-components/security/AttackReport";
|
import AttackReport from 'components/report-components/security/AttackReport';
|
||||||
import ReportHeader, {ReportTypes} from "../report-components/common/ReportHeader";
|
import ReportHeader, {ReportTypes} from '../report-components/common/ReportHeader';
|
||||||
import MonkeysStillAliveWarning from "../report-components/common/MonkeysStillAliveWarning";
|
import MonkeysStillAliveWarning from '../report-components/common/MonkeysStillAliveWarning';
|
||||||
import ReportLoader from "../report-components/common/ReportLoader";
|
import ReportLoader from '../report-components/common/ReportLoader';
|
||||||
import MustRunMonkeyWarning from "../report-components/common/MustRunMonkeyWarning";
|
import MustRunMonkeyWarning from '../report-components/common/MustRunMonkeyWarning';
|
||||||
import SecurityIssuesGlance from "../report-components/common/SecurityIssuesGlance";
|
import SecurityIssuesGlance from '../report-components/common/SecurityIssuesGlance';
|
||||||
import PrintReportButton from "../report-components/common/PrintReportButton";
|
import PrintReportButton from '../report-components/common/PrintReportButton';
|
||||||
import {extractExecutionStatusFromServerResponse} from "../report-components/common/ExecutionStatus";
|
import {extractExecutionStatusFromServerResponse} from '../report-components/common/ExecutionStatus';
|
||||||
|
|
||||||
let guardicoreLogoImage = require('../../images/guardicore-logo.png');
|
let guardicoreLogoImage = require('../../images/guardicore-logo.png');
|
||||||
|
|
||||||
|
@ -858,8 +858,8 @@ class ReportPageComponent extends AuthComponent {
|
||||||
className="label label-danger">remote code execution</span> attacks.
|
className="label label-danger">remote code execution</span> attacks.
|
||||||
<br/>
|
<br/>
|
||||||
The attack was made possible due to one of the following vulnerabilities:
|
The attack was made possible due to one of the following vulnerabilities:
|
||||||
<a href={"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-10271"}> CVE-2017-10271</a> or
|
<a href={'https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-10271'}> CVE-2017-10271</a> or
|
||||||
<a href={"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-2725"}> CVE-2019-2725</a>
|
<a href={'https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-2725'}> CVE-2019-2725</a>
|
||||||
</CollapsibleWellComponent>
|
</CollapsibleWellComponent>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
|
|
@ -7,7 +7,7 @@ import GridLoader from 'react-spinners/GridLoader';
|
||||||
import {Icon} from 'react-fa';
|
import {Icon} from 'react-fa';
|
||||||
import {Link} from 'react-router-dom';
|
import {Link} from 'react-router-dom';
|
||||||
import AuthComponent from '../AuthComponent';
|
import AuthComponent from '../AuthComponent';
|
||||||
import AwsRunTable from "../run-monkey/AwsRunTable";
|
import AwsRunTable from '../run-monkey/AwsRunTable';
|
||||||
|
|
||||||
const loading_css_override = css`
|
const loading_css_override = css`
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -348,7 +348,7 @@ class RunMonkeyPageComponent extends AuthComponent {
|
||||||
<div className='sweet-loading'>
|
<div className='sweet-loading'>
|
||||||
<GridLoader
|
<GridLoader
|
||||||
css={loading_css_override}
|
css={loading_css_override}
|
||||||
sizeUnit={"px"}
|
sizeUnit={'px'}
|
||||||
size={30}
|
size={30}
|
||||||
color={'#ffcc00'}
|
color={'#ffcc00'}
|
||||||
loading={this.state.loading}
|
loading={this.state.loading}
|
||||||
|
|
|
@ -33,7 +33,7 @@ class TelemetryPageComponent extends AuthComponent {
|
||||||
this.authFetch('/api/log/island/download')
|
this.authFetch('/api/log/island/download')
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
let filename = 'Island_log'
|
let filename = 'Island_log';
|
||||||
let logContent = (res['log_file']);
|
let logContent = (res['log_file']);
|
||||||
download(logContent, filename, 'text/plain');
|
download(logContent, filename, 'text/plain');
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import React, {Fragment} from 'react';
|
import React, {Fragment} from 'react';
|
||||||
import {Col} from 'react-bootstrap';
|
import {Col} from 'react-bootstrap';
|
||||||
import AuthComponent from '../AuthComponent';
|
import AuthComponent from '../AuthComponent';
|
||||||
import ReportHeader, {ReportTypes} from "../report-components/common/ReportHeader";
|
import ReportHeader, {ReportTypes} from '../report-components/common/ReportHeader';
|
||||||
import ReportLoader from "../report-components/common/ReportLoader";
|
import ReportLoader from '../report-components/common/ReportLoader';
|
||||||
import MustRunMonkeyWarning from "../report-components/common/MustRunMonkeyWarning";
|
import MustRunMonkeyWarning from '../report-components/common/MustRunMonkeyWarning';
|
||||||
import PrintReportButton from "../report-components/common/PrintReportButton";
|
import PrintReportButton from '../report-components/common/PrintReportButton';
|
||||||
import {extractExecutionStatusFromServerResponse} from "../report-components/common/ExecutionStatus";
|
import {extractExecutionStatusFromServerResponse} from '../report-components/common/ExecutionStatus';
|
||||||
import SummarySection from "../report-components/zerotrust/SummarySection";
|
import SummarySection from '../report-components/zerotrust/SummarySection';
|
||||||
import FindingsSection from "../report-components/zerotrust/FindingsSection";
|
import FindingsSection from '../report-components/zerotrust/FindingsSection';
|
||||||
import PrinciplesSection from "../report-components/zerotrust/PrinciplesSection";
|
import PrinciplesSection from '../report-components/zerotrust/PrinciplesSection';
|
||||||
|
|
||||||
class ZeroTrustReportPageComponent extends AuthComponent {
|
class ZeroTrustReportPageComponent extends AuthComponent {
|
||||||
|
|
||||||
|
@ -100,13 +100,12 @@ class ZeroTrustReportPageComponent extends AuthComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
stillLoadingDataFromServer() {
|
stillLoadingDataFromServer() {
|
||||||
return typeof this.state.findings === "undefined"
|
return typeof this.state.findings === 'undefined'
|
||||||
|| typeof this.state.pillars === "undefined"
|
|| typeof this.state.pillars === 'undefined'
|
||||||
|| typeof this.state.principles === "undefined";
|
|| typeof this.state.principles === 'undefined';
|
||||||
}
|
}
|
||||||
|
|
||||||
getZeroTrustReportFromServer() {
|
getZeroTrustReportFromServer() {
|
||||||
let res;
|
|
||||||
this.authFetch('/api/report/zero_trust/findings')
|
this.authFetch('/api/report/zero_trust/findings')
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
export default class MonkeysStillAliveWarning extends Component {
|
export default class MonkeysStillAliveWarning extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import {NavLink} from "react-router-dom";
|
import {NavLink} from 'react-router-dom';
|
||||||
|
|
||||||
export default class MustRunMonkeyWarning extends Component {
|
export default class MustRunMonkeyWarning extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import ReactTable from "react-table";
|
import ReactTable from 'react-table';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
class PaginatedTable extends Component {
|
class PaginatedTable extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -31,5 +31,5 @@ export default PaginatedTable;
|
||||||
PaginatedTable.propTypes = {
|
PaginatedTable.propTypes = {
|
||||||
data: PropTypes.array,
|
data: PropTypes.array,
|
||||||
columns: PropTypes.array,
|
columns: PropTypes.array,
|
||||||
pageSize: PropTypes.number,
|
pageSize: PropTypes.number
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import {Button} from "react-bootstrap";
|
import {Button} from 'react-bootstrap';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
export default class PrintReportButton extends Component {
|
export default class PrintReportButton extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import {Col} from "react-bootstrap";
|
import {Col} from 'react-bootstrap';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
let monkeyLogoImage = require('../../../images/monkey-icon.svg');
|
let monkeyLogoImage = require('../../../images/monkey-icon.svg');
|
||||||
|
|
||||||
export const ReportTypes = {
|
export const ReportTypes = {
|
||||||
zeroTrust: "Zero Trust",
|
zeroTrust: 'Zero Trust',
|
||||||
security: "Security",
|
security: 'Security',
|
||||||
null: ""
|
null: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
export class ReportHeader extends Component {
|
export class ReportHeader extends Component {
|
||||||
|
@ -41,5 +41,5 @@ export class ReportHeader extends Component {
|
||||||
export default ReportHeader;
|
export default ReportHeader;
|
||||||
|
|
||||||
ReportHeader.propTypes = {
|
ReportHeader.propTypes = {
|
||||||
report_type: PropTypes.string,
|
report_type: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {css} from "@emotion/core";
|
import {css} from '@emotion/core';
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import {GridLoader} from "react-spinners";
|
import {GridLoader} from 'react-spinners';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
const loading_css_override = css`
|
const loading_css_override = css`
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -16,7 +16,7 @@ export default class ReportLoader extends Component {
|
||||||
<h1>Generating Report...</h1>
|
<h1>Generating Report...</h1>
|
||||||
<GridLoader
|
<GridLoader
|
||||||
css={loading_css_override}
|
css={loading_css_override}
|
||||||
sizeUnit={"px"}
|
sizeUnit={'px'}
|
||||||
size={20}
|
size={20}
|
||||||
color={'#ffcc00'}
|
color={'#ffcc00'}
|
||||||
loading={this.props.loading}
|
loading={this.props.loading}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, {Component, Fragment} from "react";
|
import React, {Component, Fragment} from 'react';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
export default class SecurityIssuesGlance extends Component {
|
export default class SecurityIssuesGlance extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -4,34 +4,34 @@ import {ReactiveGraph} from 'components/reactive-graph/ReactiveGraph';
|
||||||
import {edgeGroupToColor, options} from 'components/map/MapOptions';
|
import {edgeGroupToColor, options} from 'components/map/MapOptions';
|
||||||
import '../../../styles/Collapse.scss';
|
import '../../../styles/Collapse.scss';
|
||||||
import AuthComponent from '../../AuthComponent';
|
import AuthComponent from '../../AuthComponent';
|
||||||
import {ScanStatus} from "../../attack/techniques/Helpers";
|
import {ScanStatus} from '../../attack/techniques/Helpers';
|
||||||
import Collapse from '@kunukn/react-collapse';
|
import Collapse from '@kunukn/react-collapse';
|
||||||
|
|
||||||
import T1210 from '../../attack/techniques/T1210';
|
import T1210 from '../../attack/techniques/T1210';
|
||||||
import T1197 from '../../attack/techniques/T1197';
|
import T1197 from '../../attack/techniques/T1197';
|
||||||
import T1110 from '../../attack/techniques/T1110';
|
import T1110 from '../../attack/techniques/T1110';
|
||||||
import T1075 from "../../attack/techniques/T1075";
|
import T1075 from '../../attack/techniques/T1075';
|
||||||
import T1003 from "../../attack/techniques/T1003";
|
import T1003 from '../../attack/techniques/T1003';
|
||||||
import T1059 from "../../attack/techniques/T1059";
|
import T1059 from '../../attack/techniques/T1059';
|
||||||
import T1086 from "../../attack/techniques/T1086";
|
import T1086 from '../../attack/techniques/T1086';
|
||||||
import T1082 from "../../attack/techniques/T1082";
|
import T1082 from '../../attack/techniques/T1082';
|
||||||
import T1145 from "../../attack/techniques/T1145";
|
import T1145 from '../../attack/techniques/T1145';
|
||||||
import T1105 from "../../attack/techniques/T1105";
|
import T1105 from '../../attack/techniques/T1105';
|
||||||
import T1107 from "../../attack/techniques/T1107";
|
import T1107 from '../../attack/techniques/T1107';
|
||||||
import T1065 from "../../attack/techniques/T1065";
|
import T1065 from '../../attack/techniques/T1065';
|
||||||
import T1035 from "../../attack/techniques/T1035";
|
import T1035 from '../../attack/techniques/T1035';
|
||||||
import T1129 from "../../attack/techniques/T1129";
|
import T1129 from '../../attack/techniques/T1129';
|
||||||
import T1106 from "../../attack/techniques/T1106";
|
import T1106 from '../../attack/techniques/T1106';
|
||||||
import T1188 from "../../attack/techniques/T1188";
|
import T1188 from '../../attack/techniques/T1188';
|
||||||
import T1090 from "../../attack/techniques/T1090";
|
import T1090 from '../../attack/techniques/T1090';
|
||||||
import T1041 from "../../attack/techniques/T1041";
|
import T1041 from '../../attack/techniques/T1041';
|
||||||
import T1222 from "../../attack/techniques/T1222";
|
import T1222 from '../../attack/techniques/T1222';
|
||||||
import T1005 from "../../attack/techniques/T1005";
|
import T1005 from '../../attack/techniques/T1005';
|
||||||
import T1018 from "../../attack/techniques/T1018";
|
import T1018 from '../../attack/techniques/T1018';
|
||||||
import T1016 from "../../attack/techniques/T1016";
|
import T1016 from '../../attack/techniques/T1016';
|
||||||
import T1021 from "../../attack/techniques/T1021";
|
import T1021 from '../../attack/techniques/T1021';
|
||||||
import T1064 from "../../attack/techniques/T1064";
|
import T1064 from '../../attack/techniques/T1064';
|
||||||
import {extractExecutionStatusFromServerResponse} from "../common/ExecutionStatus";
|
import {extractExecutionStatusFromServerResponse} from '../common/ExecutionStatus';
|
||||||
|
|
||||||
const tech_components = {
|
const tech_components = {
|
||||||
'T1210': T1210,
|
'T1210': T1210,
|
||||||
|
@ -115,11 +115,11 @@ class AttackReportPageComponent extends AuthComponent {
|
||||||
|
|
||||||
getTechniqueCollapse(tech_id) {
|
getTechniqueCollapse(tech_id) {
|
||||||
return (
|
return (
|
||||||
<div key={tech_id} className={classNames("collapse-item", {"item--active": this.state.collapseOpen === tech_id})}>
|
<div key={tech_id} className={classNames('collapse-item', {'item--active': this.state.collapseOpen === tech_id})}>
|
||||||
<button className={classNames("btn-collapse", this.getComponentClass(tech_id))} onClick={() => this.onToggle(tech_id)}>
|
<button className={classNames('btn-collapse', this.getComponentClass(tech_id))} onClick={() => this.onToggle(tech_id)}>
|
||||||
<span>{this.state.report[tech_id].title}</span>
|
<span>{this.state.report[tech_id].title}</span>
|
||||||
<span>
|
<span>
|
||||||
<i className={classNames("fa", this.state.collapseOpen === tech_id ? "fa-chevron-down" : "fa-chevron-up")}></i>
|
<i className={classNames('fa', this.state.collapseOpen === tech_id ? 'fa-chevron-down' : 'fa-chevron-up')}></i>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<Collapse
|
<Collapse
|
||||||
|
|
|
@ -6,7 +6,7 @@ let renderArray = function (val) {
|
||||||
};
|
};
|
||||||
|
|
||||||
let renderIpAddresses = function (val) {
|
let renderIpAddresses = function (val) {
|
||||||
return <div>{renderArray(val.ip_addresses)} {(val.domain_name ? " (".concat(val.domain_name, ")") : "")} </div>;
|
return <div>{renderArray(val.ip_addresses)} {(val.domain_name ? ' ('.concat(val.domain_name, ')') : '')} </div>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
|
|
@ -6,7 +6,7 @@ let renderArray = function (val) {
|
||||||
};
|
};
|
||||||
|
|
||||||
let renderIpAddresses = function (val) {
|
let renderIpAddresses = function (val) {
|
||||||
return <span> {renderArray(val.ip_addresses)} {(val.domain_name ? " (".concat(val.domain_name, ")") : "")} </span>;
|
return <span> {renderArray(val.ip_addresses)} {(val.domain_name ? ' ('.concat(val.domain_name, ')') : '')} </span>;
|
||||||
};
|
};
|
||||||
|
|
||||||
let renderMachine = function (data) {
|
let renderMachine = function (data) {
|
||||||
|
@ -14,18 +14,18 @@ let renderMachine = function (data) {
|
||||||
};
|
};
|
||||||
|
|
||||||
let renderPbaResults = function (results) {
|
let renderPbaResults = function (results) {
|
||||||
let pbaClass = "";
|
let pbaClass = '';
|
||||||
if (results[1]) {
|
if (results[1]) {
|
||||||
pbaClass = "pba-success"
|
pbaClass = 'pba-success'
|
||||||
} else {
|
} else {
|
||||||
pbaClass = "pba-danger"
|
pbaClass = 'pba-danger'
|
||||||
}
|
}
|
||||||
return <div className={pbaClass}> {results[0]} </div>
|
return <div className={pbaClass}> {results[0]} </div>
|
||||||
};
|
};
|
||||||
|
|
||||||
const subColumns = [
|
const subColumns = [
|
||||||
{id: 'pba_name', Header: "Name", accessor: x => x.name, style: {'whiteSpace': 'unset'}, width: 160},
|
{id: 'pba_name', Header: 'Name', accessor: x => x.name, style: {'whiteSpace': 'unset'}, width: 160},
|
||||||
{id: 'pba_output', Header: "Output", accessor: x => renderPbaResults(x.result), style: {'whiteSpace': 'unset'}}
|
{id: 'pba_output', Header: 'Output', accessor: x => renderPbaResults(x.result), style: {'whiteSpace': 'unset'}}
|
||||||
];
|
];
|
||||||
|
|
||||||
let renderDetails = function (data) {
|
let renderDetails = function (data) {
|
||||||
|
@ -36,7 +36,7 @@ let renderDetails = function (data) {
|
||||||
columns={subColumns}
|
columns={subColumns}
|
||||||
defaultPageSize={defaultPageSize}
|
defaultPageSize={defaultPageSize}
|
||||||
showPagination={showPagination}
|
showPagination={showPagination}
|
||||||
style={{"backgroundColor": "#ededed"}}
|
style={{'backgroundColor': '#ededed'}}
|
||||||
/>
|
/>
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,8 +57,8 @@ class PostBreachComponent extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let pbaMachines = this.props.data.filter(function (value, index, arr) {
|
let pbaMachines = this.props.data.filter(function (value) {
|
||||||
return (value.pba_results !== "None" && value.pba_results.length > 0);
|
return (value.pba_results !== 'None' && value.pba_results.length > 0);
|
||||||
});
|
});
|
||||||
let defaultPageSize = pbaMachines.length > pageSize ? pageSize : pbaMachines.length;
|
let defaultPageSize = pbaMachines.length > pageSize ? pageSize : pbaMachines.length;
|
||||||
let showPagination = pbaMachines > pageSize;
|
let showPagination = pbaMachines > pageSize;
|
||||||
|
|
|
@ -6,7 +6,7 @@ let renderArray = function (val) {
|
||||||
};
|
};
|
||||||
|
|
||||||
let renderIpAddresses = function (val) {
|
let renderIpAddresses = function (val) {
|
||||||
return <div>{renderArray(val.ip_addresses)} {(val.domain_name ? " (".concat(val.domain_name, ")") : "")} </div>;
|
return <div>{renderArray(val.ip_addresses)} {(val.domain_name ? ' ('.concat(val.domain_name, ')') : '')} </div>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, {Component, Fragment} from "react";
|
import React, {Component, Fragment} from 'react';
|
||||||
import EventsModal from "./EventsModal";
|
import EventsModal from './EventsModal';
|
||||||
import {Badge, Button} from "react-bootstrap";
|
import {Badge, Button} from 'react-bootstrap';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
export default class EventsButton extends Component {
|
export default class EventsButton extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -23,7 +23,7 @@ export default class EventsButton extends Component {
|
||||||
return <Fragment>
|
return <Fragment>
|
||||||
<EventsModal events={this.props.events} showEvents={this.state.isShow} hideCallback={this.hide}
|
<EventsModal events={this.props.events} showEvents={this.state.isShow} hideCallback={this.hide}
|
||||||
exportFilename={this.props.exportFilename}/>
|
exportFilename={this.props.exportFilename}/>
|
||||||
<div className="text-center" style={{"display": "grid"}}>
|
<div className="text-center" style={{'display': 'grid'}}>
|
||||||
<Button className="btn btn-primary btn-lg" onClick={this.show}>
|
<Button className="btn btn-primary btn-lg" onClick={this.show}>
|
||||||
<i className="fa fa-list"/> Events {this.createEventsAmountBadge()}
|
<i className="fa fa-list"/> Events {this.createEventsAmountBadge()}
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -32,12 +32,12 @@ export default class EventsButton extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
createEventsAmountBadge() {
|
createEventsAmountBadge() {
|
||||||
const eventsAmountBadgeContent = this.props.events.length > 9 ? "9+" : this.props.events.length;
|
const eventsAmountBadgeContent = this.props.events.length > 9 ? '9+' : this.props.events.length;
|
||||||
return <Badge>{eventsAmountBadgeContent}</Badge>;
|
return <Badge>{eventsAmountBadgeContent}</Badge>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EventsButton.propTypes = {
|
EventsButton.propTypes = {
|
||||||
events: PropTypes.array,
|
events: PropTypes.array,
|
||||||
exportFilename: PropTypes.string,
|
exportFilename: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import {Badge, Modal} from "react-bootstrap";
|
import {Badge, Modal} from 'react-bootstrap';
|
||||||
import EventsTimeline from "./EventsTimeline";
|
import EventsTimeline from './EventsTimeline';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
import saveJsonToFile from "../../utils/SaveJsonToFile";
|
import saveJsonToFile from '../../utils/SaveJsonToFile';
|
||||||
import EventsModalButtons from "./EventsModalButtons";
|
import EventsModalButtons from './EventsModalButtons';
|
||||||
import Pluralize from 'pluralize'
|
import Pluralize from 'pluralize'
|
||||||
import {statusToLabelType} from "./StatusLabel";
|
import {statusToLabelType} from './StatusLabel';
|
||||||
|
|
||||||
export default class EventsModal extends Component {
|
export default class EventsModal extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -23,7 +23,7 @@ export default class EventsModal extends Component {
|
||||||
<hr/>
|
<hr/>
|
||||||
<p>
|
<p>
|
||||||
There {Pluralize('is', this.props.events.length)} {<div
|
There {Pluralize('is', this.props.events.length)} {<div
|
||||||
className={"label label-primary"}>{this.props.events.length}</div>} {Pluralize('event', this.props.events.length)} associated
|
className={'label label-primary'}>{this.props.events.length}</div>} {Pluralize('event', this.props.events.length)} associated
|
||||||
with this finding.
|
with this finding.
|
||||||
</p>
|
</p>
|
||||||
{this.props.events.length > 5 ? this.renderButtons() : null}
|
{this.props.events.length > 5 ? this.renderButtons() : null}
|
||||||
|
@ -49,5 +49,5 @@ export default class EventsModal extends Component {
|
||||||
EventsModal.propTypes = {
|
EventsModal.propTypes = {
|
||||||
showEvents: PropTypes.bool,
|
showEvents: PropTypes.bool,
|
||||||
events: PropTypes.array,
|
events: PropTypes.array,
|
||||||
hideCallback: PropTypes.func,
|
hideCallback: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import ExportEventsButton from "./ExportEventsButton";
|
import ExportEventsButton from './ExportEventsButton';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
export default class EventsModalButtons extends Component {
|
export default class EventsModalButtons extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import {Timeline, TimelineEvent} from "react-event-timeline";
|
import {Timeline, TimelineEvent} from 'react-event-timeline';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
let monkeyLocalIcon = require('../../../images/zerotrust/im-alert-machine-icon.svg');
|
let monkeyLocalIcon = require('../../../images/zerotrust/im-alert-machine-icon.svg');
|
||||||
let monkeyNetworkIcon = require('../../../images/zerotrust/im-alert-network-icon.svg');
|
let monkeyNetworkIcon = require('../../../images/zerotrust/im-alert-network-icon.svg');
|
||||||
|
|
||||||
const eventTypeToIcon = {
|
const eventTypeToIcon = {
|
||||||
"monkey_local": monkeyLocalIcon,
|
'monkey_local': monkeyLocalIcon,
|
||||||
"monkey_network": monkeyNetworkIcon,
|
'monkey_network': monkeyNetworkIcon
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class EventsTimeline extends Component {
|
export default class EventsTimeline extends Component {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import {Button} from "react-bootstrap";
|
import {Button} from 'react-bootstrap';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
export default class ExportEventsButton extends Component {
|
export default class ExportEventsButton extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, {Component, Fragment} from "react";
|
import React, {Component, Fragment} from 'react';
|
||||||
import PillarLabel from "./PillarLabel";
|
import PillarLabel from './PillarLabel';
|
||||||
import EventsButton from "./EventsButton";
|
import EventsButton from './EventsButton';
|
||||||
import ZeroTrustPillars, {ZeroTrustStatuses} from "./ZeroTrustPillars";
|
import ZeroTrustPillars, {ZeroTrustStatuses} from './ZeroTrustPillars';
|
||||||
import {FindingsTable} from "./FindingsTable";
|
import {FindingsTable} from './FindingsTable';
|
||||||
|
|
||||||
|
|
||||||
class FindingsSection extends Component {
|
class FindingsSection extends Component {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React, {Component, Fragment} from "react";
|
import React, {Component, Fragment} from 'react';
|
||||||
import StatusLabel from "./StatusLabel";
|
import StatusLabel from './StatusLabel';
|
||||||
import PaginatedTable from "../common/PaginatedTable";
|
import PaginatedTable from '../common/PaginatedTable';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
import PillarLabel from "./PillarLabel";
|
import PillarLabel from './PillarLabel';
|
||||||
import EventsButton from "./EventsButton";
|
import EventsButton from './EventsButton';
|
||||||
|
|
||||||
const EVENTS_COLUMN_MAX_WIDTH = 160;
|
const EVENTS_COLUMN_MAX_WIDTH = 160;
|
||||||
const PILLARS_COLUMN_MAX_WIDTH = 200;
|
const PILLARS_COLUMN_MAX_WIDTH = 200;
|
||||||
|
@ -16,25 +16,25 @@ const columns = [
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
Header: 'Events', id: "events",
|
Header: 'Events', id: 'events',
|
||||||
accessor: x => {
|
accessor: x => {
|
||||||
return <EventsButton events={x.events} exportFilename={"Events_" + x.test_key}/>;
|
return <EventsButton events={x.events} exportFilename={'Events_' + x.test_key}/>;
|
||||||
},
|
},
|
||||||
maxWidth: EVENTS_COLUMN_MAX_WIDTH,
|
maxWidth: EVENTS_COLUMN_MAX_WIDTH
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
Header: 'Pillars', id: "pillars",
|
Header: 'Pillars', id: 'pillars',
|
||||||
accessor: x => {
|
accessor: x => {
|
||||||
const pillars = x.pillars;
|
const pillars = x.pillars;
|
||||||
const pillarLabels = pillars.map((pillar) =>
|
const pillarLabels = pillars.map((pillar) =>
|
||||||
<PillarLabel key={pillar.name} pillar={pillar.name} status={pillar.status}/>
|
<PillarLabel key={pillar.name} pillar={pillar.name} status={pillar.status}/>
|
||||||
);
|
);
|
||||||
return <div style={{textAlign: "center"}}>{pillarLabels}</div>;
|
return <div style={{textAlign: 'center'}}>{pillarLabels}</div>;
|
||||||
},
|
},
|
||||||
maxWidth: PILLARS_COLUMN_MAX_WIDTH,
|
maxWidth: PILLARS_COLUMN_MAX_WIDTH,
|
||||||
style: {'whiteSpace': 'unset'}
|
style: {'whiteSpace': 'unset'}
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -43,7 +43,7 @@ const columns = [
|
||||||
export class FindingsTable extends Component {
|
export class FindingsTable extends Component {
|
||||||
render() {
|
render() {
|
||||||
return <Fragment>
|
return <Fragment>
|
||||||
<h3>{<span style={{display: "inline-block"}}><StatusLabel status={this.props.status} showText={true}/>
|
<h3>{<span style={{display: 'inline-block'}}><StatusLabel status={this.props.status} showText={true}/>
|
||||||
</span>} tests' findings</h3>
|
</span>} tests' findings</h3>
|
||||||
<PaginatedTable data={this.props.data} pageSize={10} columns={columns}/>
|
<PaginatedTable data={this.props.data} pageSize={10} columns={columns}/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import {statusToLabelType} from "./StatusLabel";
|
import {statusToLabelType} from './StatusLabel';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
const pillarToIcon = {
|
const pillarToIcon = {
|
||||||
"Data": "fa fa-database",
|
'Data': 'fa fa-database',
|
||||||
"People": "fa fa-user",
|
'People': 'fa fa-user',
|
||||||
"Networks": "fa fa-wifi",
|
'Networks': 'fa fa-wifi',
|
||||||
"Workloads": "fa fa-cloud",
|
'Workloads': 'fa fa-cloud',
|
||||||
"Devices": "fa fa-laptop",
|
'Devices': 'fa fa-laptop',
|
||||||
"Visibility & Analytics": "fa fa-eye-slash",
|
'Visibility & Analytics': 'fa fa-eye-slash',
|
||||||
"Automation & Orchestration": "fa fa-cogs",
|
'Automation & Orchestration': 'fa fa-cogs'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class PillarLabel extends Component {
|
export default class PillarLabel extends Component {
|
||||||
render() {
|
render() {
|
||||||
const className = "label " + statusToLabelType[this.props.status];
|
const className = 'label ' + statusToLabelType[this.props.status];
|
||||||
return <div className={className} style={{margin: '2px', display: 'inline-block'}}><i
|
return <div className={className} style={{margin: '2px', display: 'inline-block'}}><i
|
||||||
className={pillarToIcon[this.props.pillar]}/> {this.props.pillar}</div>
|
className={pillarToIcon[this.props.pillar]}/> {this.props.pillar}</div>
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ export default class PillarLabel extends Component {
|
||||||
|
|
||||||
PillarLabel.propTypes = {
|
PillarLabel.propTypes = {
|
||||||
status: PropTypes.string,
|
status: PropTypes.string,
|
||||||
pillar: PropTypes.string,
|
pillar: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
import ResponsiveVennDiagram from "./venn-components/ResponsiveVennDiagram";
|
import ResponsiveVennDiagram from './venn-components/ResponsiveVennDiagram';
|
||||||
|
|
||||||
class PillarOverview extends Component {
|
class PillarOverview extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -13,5 +13,5 @@ class PillarOverview extends Component {
|
||||||
export default PillarOverview;
|
export default PillarOverview;
|
||||||
|
|
||||||
PillarOverview.propTypes = {
|
PillarOverview.propTypes = {
|
||||||
grades: PropTypes.array,
|
grades: PropTypes.array
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import SinglePillarPrinciplesStatus from "./SinglePillarPrinciplesStatus";
|
import SinglePillarPrinciplesStatus from './SinglePillarPrinciplesStatus';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
export default class PrinciplesSection extends Component {
|
export default class PrinciplesSection extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React, {Fragment} from "react";
|
import React, {Fragment} from 'react';
|
||||||
import PaginatedTable from "../common/PaginatedTable";
|
import PaginatedTable from '../common/PaginatedTable';
|
||||||
import AuthComponent from "../../AuthComponent";
|
import AuthComponent from '../../AuthComponent';
|
||||||
import StatusLabel from "./StatusLabel";
|
import StatusLabel from './StatusLabel';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
import {ZeroTrustStatuses} from "./ZeroTrustPillars";
|
import {ZeroTrustStatuses} from './ZeroTrustPillars';
|
||||||
|
|
||||||
|
|
||||||
const MAX_WIDTH_STATUS_COLUMN = 80;
|
const MAX_WIDTH_STATUS_COLUMN = 80;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import StatusLabel from "./StatusLabel";
|
import StatusLabel from './StatusLabel';
|
||||||
import {ZeroTrustStatuses} from "./ZeroTrustPillars";
|
import {ZeroTrustStatuses} from './ZeroTrustPillars';
|
||||||
import {NavLink} from "react-router-dom";
|
import {NavLink} from 'react-router-dom';
|
||||||
import {Panel} from "react-bootstrap";
|
import {Panel} from 'react-bootstrap';
|
||||||
|
|
||||||
|
|
||||||
class ZeroTrustReportLegend extends Component {
|
class ZeroTrustReportLegend extends Component {
|
||||||
|
@ -27,31 +27,31 @@ class ZeroTrustReportLegend extends Component {
|
||||||
|
|
||||||
getLegendContent() {
|
getLegendContent() {
|
||||||
return <div id={this.constructor.name}>
|
return <div id={this.constructor.name}>
|
||||||
<ul style={{listStyle: "none"}}>
|
<ul style={{listStyle: 'none'}}>
|
||||||
<li>
|
<li>
|
||||||
<div style={{display: "inline-block"}}>
|
<div style={{display: 'inline-block'}}>
|
||||||
<StatusLabel showText={true} status={ZeroTrustStatuses.failed}/>
|
<StatusLabel showText={true} status={ZeroTrustStatuses.failed}/>
|
||||||
</div>
|
</div>
|
||||||
{"\t"}At least one of the tests related to this component failed. This means that the Infection Monkey detected an
|
{'\t'}At least one of the tests related to this component failed. This means that the Infection Monkey detected an
|
||||||
unmet Zero Trust requirement.
|
unmet Zero Trust requirement.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div style={{display: "inline-block"}}>
|
<div style={{display: 'inline-block'}}>
|
||||||
<StatusLabel showText={true} status={ZeroTrustStatuses.verify}/>
|
<StatusLabel showText={true} status={ZeroTrustStatuses.verify}/>
|
||||||
</div>
|
</div>
|
||||||
{"\t"}At least one of the tests’ results related to this component requires further manual verification.
|
{'\t'}At least one of the tests’ results related to this component requires further manual verification.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div style={{display: "inline-block"}}>
|
<div style={{display: 'inline-block'}}>
|
||||||
<StatusLabel showText={true} status={ZeroTrustStatuses.passed}/>
|
<StatusLabel showText={true} status={ZeroTrustStatuses.passed}/>
|
||||||
</div>
|
</div>
|
||||||
{"\t"}All Tests related to this pillar passed. No violation of a Zero Trust guiding principle was detected.
|
{'\t'}All Tests related to this pillar passed. No violation of a Zero Trust guiding principle was detected.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div style={{display: "inline-block"}}>
|
<div style={{display: 'inline-block'}}>
|
||||||
<StatusLabel showText={true} status={ZeroTrustStatuses.unexecuted}/>
|
<StatusLabel showText={true} status={ZeroTrustStatuses.unexecuted}/>
|
||||||
</div>
|
</div>
|
||||||
{"\t"}This status means the test wasn't executed.To activate more tests, refer to the Monkey <NavLink
|
{'\t'}This status means the test wasn't executed.To activate more tests, refer to the Monkey <NavLink
|
||||||
to="/configuration"><u>configuration</u></NavLink> page.
|
to="/configuration"><u>configuration</u></NavLink> page.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import AuthComponent from "../../AuthComponent";
|
import AuthComponent from '../../AuthComponent';
|
||||||
import PillarLabel from "./PillarLabel";
|
import PillarLabel from './PillarLabel';
|
||||||
import PrinciplesStatusTable from "./PrinciplesStatusTable";
|
import PrinciplesStatusTable from './PrinciplesStatusTable';
|
||||||
import React from "react";
|
import React from 'react';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
import {Panel} from "react-bootstrap";
|
import {Panel} from 'react-bootstrap';
|
||||||
|
|
||||||
export default class SinglePillarPrinciplesStatus extends AuthComponent {
|
export default class SinglePillarPrinciplesStatus extends AuthComponent {
|
||||||
render() {
|
render() {
|
||||||
|
@ -14,7 +14,7 @@ export default class SinglePillarPrinciplesStatus extends AuthComponent {
|
||||||
<Panel>
|
<Panel>
|
||||||
<Panel.Heading>
|
<Panel.Heading>
|
||||||
<Panel.Title toggle>
|
<Panel.Title toggle>
|
||||||
<h3 style={{textAlign: "center", marginTop: "1px", marginBottom: "1px"}}>
|
<h3 style={{textAlign: 'center', marginTop: '1px', marginBottom: '1px'}}>
|
||||||
<i className="fa fa-chevron-down"/> <PillarLabel pillar={this.props.pillar}
|
<i className="fa fa-chevron-down"/> <PillarLabel pillar={this.props.pillar}
|
||||||
status={this.props.pillarsToStatuses[this.props.pillar]}/>
|
status={this.props.pillarsToStatuses[this.props.pillar]}/>
|
||||||
</h3>
|
</h3>
|
||||||
|
@ -33,5 +33,5 @@ export default class SinglePillarPrinciplesStatus extends AuthComponent {
|
||||||
|
|
||||||
SinglePillarPrinciplesStatus.propTypes = {
|
SinglePillarPrinciplesStatus.propTypes = {
|
||||||
principlesStatus: PropTypes.array,
|
principlesStatus: PropTypes.array,
|
||||||
pillar: PropTypes.string,
|
pillar: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
const statusToIcon = {
|
const statusToIcon = {
|
||||||
"Passed": "fa-check",
|
'Passed': 'fa-check',
|
||||||
"Verify": "fa-exclamation-triangle",
|
'Verify': 'fa-exclamation-triangle',
|
||||||
"Failed": "fa-bomb",
|
'Failed': 'fa-bomb',
|
||||||
"Unexecuted": "fa-question",
|
'Unexecuted': 'fa-question'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const statusToLabelType = {
|
export const statusToLabelType = {
|
||||||
"Passed": "label-success",
|
'Passed': 'label-success',
|
||||||
"Verify": "label-warning",
|
'Verify': 'label-warning',
|
||||||
"Failed": "label-danger",
|
'Failed': 'label-danger',
|
||||||
"Unexecuted": "label-default",
|
'Unexecuted': 'label-default'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class StatusLabel extends Component {
|
export default class StatusLabel extends Component {
|
||||||
render() {
|
render() {
|
||||||
let text = "";
|
let text = '';
|
||||||
if (this.props.showText) {
|
if (this.props.showText) {
|
||||||
text = " " + this.props.status;
|
text = ' ' + this.props.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"label " + statusToLabelType[this.props.status]} style={{display: "flow-root"}}>
|
<div className={'label ' + statusToLabelType[this.props.status]} style={{display: 'flow-root'}}>
|
||||||
<i className={"fa " + statusToIcon[this.props.status] + " " + this.props.size}/>{text}
|
<i className={'fa ' + statusToIcon[this.props.status] + ' ' + this.props.size}/>{text}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, {Component, Fragment} from "react";
|
import React, {Component, Fragment} from 'react';
|
||||||
import PillarLabel from "./PillarLabel";
|
import PillarLabel from './PillarLabel';
|
||||||
import StatusLabel from "./StatusLabel";
|
import StatusLabel from './StatusLabel';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
import {ZeroTrustStatuses} from "./ZeroTrustPillars";
|
import {ZeroTrustStatuses} from './ZeroTrustPillars';
|
||||||
|
|
||||||
export default class StatusesToPillarsSummary extends Component {
|
export default class StatusesToPillarsSummary extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React, {Component} from "react";
|
import React, {Component} from 'react';
|
||||||
import {Col, Grid, Row} from "react-bootstrap";
|
import {Col, Grid, Row} from 'react-bootstrap';
|
||||||
import MonkeysStillAliveWarning from "../common/MonkeysStillAliveWarning";
|
import MonkeysStillAliveWarning from '../common/MonkeysStillAliveWarning';
|
||||||
import PillarsOverview from "./PillarOverview";
|
import PillarsOverview from './PillarOverview';
|
||||||
import ZeroTrustReportLegend from "./ReportLegend";
|
import ZeroTrustReportLegend from './ReportLegend';
|
||||||
import * as PropTypes from "prop-types";
|
import * as PropTypes from 'prop-types';
|
||||||
|
|
||||||
export default class SummarySection extends Component {
|
export default class SummarySection extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
export const ZeroTrustPillars = {
|
export const ZeroTrustPillars = {
|
||||||
data: "Data",
|
data: 'Data',
|
||||||
people: "People",
|
people: 'People',
|
||||||
network: "Networks",
|
network: 'Networks',
|
||||||
workload: "Workload",
|
workload: 'Workload',
|
||||||
devices: "Devices",
|
devices: 'Devices',
|
||||||
visibility: "Visibility & Analytics",
|
visibility: 'Visibility & Analytics',
|
||||||
automation: "Automation & Orchestration"
|
automation: 'Automation & Orchestration'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ZeroTrustStatuses = {
|
export const ZeroTrustStatuses = {
|
||||||
failed: "Failed",
|
failed: 'Failed',
|
||||||
verify: "Verify",
|
verify: 'Verify',
|
||||||
passed: "Passed",
|
passed: 'Passed',
|
||||||
unexecuted: "Unexecuted"
|
unexecuted: 'Unexecuted'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ZeroTrustPillars;
|
export default ZeroTrustPillars;
|
||||||
|
|
|
@ -41,17 +41,17 @@ class ArcNode extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
handleClick(e_) {
|
handleClick() {
|
||||||
this.props.disableHover(this.refs.overlay);
|
this.props.disableHover(this.refs.overlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOver(e_) {
|
handleOver() {
|
||||||
if (this.props.hover) {
|
if (this.props.hover) {
|
||||||
this.refs.overlay.show();
|
this.refs.overlay.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOut(e_) {
|
handleOut() {
|
||||||
if (this.props.hover) {
|
if (this.props.hover) {
|
||||||
this.refs.overlay.hide();
|
this.refs.overlay.hide();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import PillarLabel from "../PillarLabel";
|
import PillarLabel from '../PillarLabel';
|
||||||
import {Popover, OverlayTrigger} from 'react-bootstrap';
|
import {Popover, OverlayTrigger} from 'react-bootstrap';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
|
@ -38,17 +38,17 @@ class CircularNode extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
handleClick(e_) {
|
handleClick() {
|
||||||
this.props.disableHover(this.refs.overlay);
|
this.props.disableHover(this.refs.overlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOver(e_) {
|
handleOver() {
|
||||||
if (this.props.hover) {
|
if (this.props.hover) {
|
||||||
this.refs.overlay.show();
|
this.refs.overlay.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOut(e_) {
|
handleOut() {
|
||||||
if (this.props.hover) {
|
if (this.props.hover) {
|
||||||
this.refs.overlay.hide();
|
this.refs.overlay.hide();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import CircularNode from './CircularNode'
|
||||||
import ArcNode from './ArcNode'
|
import ArcNode from './ArcNode'
|
||||||
import {TypographicUtilities} from './Utility.js'
|
import {TypographicUtilities} from './Utility.js'
|
||||||
import './VennDiagram.css'
|
import './VennDiagram.css'
|
||||||
import {ZeroTrustStatuses} from "../ZeroTrustPillars";
|
import {ZeroTrustStatuses} from '../ZeroTrustPillars';
|
||||||
|
|
||||||
class VennDiagram extends React.Component {
|
class VennDiagram extends React.Component {
|
||||||
constructor(props_) {
|
constructor(props_) {
|
||||||
|
@ -131,16 +131,12 @@ class VennDiagram extends React.Component {
|
||||||
|
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
let hidden = 'none';
|
|
||||||
let html = '';
|
|
||||||
let bcolor = '#DEDEDE';
|
|
||||||
|
|
||||||
if (this.state.currentPopover !== undefined) {
|
if (this.state.currentPopover !== undefined) {
|
||||||
this.state.currentPopover.show();
|
this.state.currentPopover.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelectorAll('circle, path').forEach((d_, i_) => {
|
document.querySelectorAll('circle, path').forEach((d_) => {
|
||||||
d_.setAttribute('opacity', "0.8");
|
d_.setAttribute('opacity', '0.8');
|
||||||
});
|
});
|
||||||
|
|
||||||
if (e.target.id.includes('Node')) {
|
if (e.target.id.includes('Node')) {
|
||||||
|
@ -175,10 +171,9 @@ class VennDiagram extends React.Component {
|
||||||
let data = [];
|
let data = [];
|
||||||
const omit = (prop, {[prop]: _, ...rest}) => rest;
|
const omit = (prop, {[prop]: _, ...rest}) => rest;
|
||||||
|
|
||||||
this.props.pillarsGrades.forEach((d_, i_) => {
|
this.props.pillarsGrades.forEach((d_) => {
|
||||||
|
|
||||||
let params = omit('pillar', d_);
|
let params = omit('pillar', d_);
|
||||||
let sum = Object.keys(params).reduce((sum_, key_) => sum_ + parseFloat(params[key_] || 0), 0);
|
|
||||||
let key = TypographicUtilities.removeAmpersand(d_.pillar);
|
let key = TypographicUtilities.removeAmpersand(d_.pillar);
|
||||||
let html = self.buildTooltipHtmlContent(params);
|
let html = self.buildTooltipHtmlContent(params);
|
||||||
let rule = null;
|
let rule = null;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table'
|
import ReactTable from 'react-table'
|
||||||
import checkboxHOC from "react-table/lib/hoc/selectTable";
|
import checkboxHOC from 'react-table/lib/hoc/selectTable';
|
||||||
|
|
||||||
const CheckboxTable = checkboxHOC(ReactTable);
|
const CheckboxTable = checkboxHOC(ReactTable);
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class AwsRunTableComponent extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleSelection = (key, shift, row) => {
|
toggleSelection = (key) => {
|
||||||
// start off with the existing state
|
// start off with the existing state
|
||||||
let selection = [...this.state.selection];
|
let selection = [...this.state.selection];
|
||||||
const keyIndex = selection.indexOf(key);
|
const keyIndex = selection.indexOf(key);
|
||||||
|
@ -68,13 +68,13 @@ class AwsRunTableComponent extends React.Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
getTrProps = (s, r) => {
|
getTrProps = (s, r) => {
|
||||||
let color = "inherit";
|
let color = 'inherit';
|
||||||
if (r) {
|
if (r) {
|
||||||
let instId = r.original.instance_id;
|
let instId = r.original.instance_id;
|
||||||
if (this.isSelected(instId)) {
|
if (this.isSelected(instId)) {
|
||||||
color = "#ffed9f";
|
color = '#ffed9f';
|
||||||
} else if (this.state.result.hasOwnProperty(instId)) {
|
} else if (this.state.result.hasOwnProperty(instId)) {
|
||||||
color = this.state.result[instId] ? "#00f01b" : '#f00000'
|
color = this.state.result[instId] ? '#00f01b' : '#f00000'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ class VersionComponent extends React.Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
currentVersion: res['current_version'],
|
currentVersion: res['current_version'],
|
||||||
newerVersion: res['newer_version'],
|
newerVersion: res['newer_version'],
|
||||||
downloadLink: res['download_link'],
|
downloadLink: res['download_link']
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class CheckboxComponent extends React.PureComponent {
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
checked: !this.state.checked,
|
checked: !this.state.checked,
|
||||||
isAnimating: true,
|
isAnimating: true
|
||||||
}, () => {
|
}, () => {
|
||||||
this.props.changeHandler ? this.props.changeHandler(this.props.name, this.state.checked) : null
|
this.props.changeHandler ? this.props.changeHandler(this.props.name, this.state.checked) : null
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import FileSaver from "file-saver";
|
import FileSaver from 'file-saver';
|
||||||
|
|
||||||
export default function saveJsonToFile(dataToSave, filename) {
|
export default function saveJsonToFile(dataToSave, filename) {
|
||||||
const content = JSON.stringify(dataToSave, null, 2);
|
const content = JSON.stringify(dataToSave, null, 2);
|
||||||
const blob = new Blob([content], {type: "text/plain;charset=utf-8"});
|
const blob = new Blob([content], {type: 'text/plain;charset=utf-8'});
|
||||||
FileSaver.saveAs(blob, filename + ".json");
|
FileSaver.saveAs(blob, filename + '.json');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import StandardConfig from './StandardConfig';
|
import StandardConfig from './StandardConfig';
|
||||||
import AwsConfig from './AwsConfig';
|
import AwsConfig from './AwsConfig';
|
||||||
import PasswordConfig from "./PasswordConfig";
|
import PasswordConfig from './PasswordConfig';
|
||||||
|
|
||||||
const SERVER_CONFIG_JSON = require('../../../server_config.json');
|
const SERVER_CONFIG_JSON = require('../../../server_config.json');
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ import decode from 'jwt-decode';
|
||||||
export default class AuthService {
|
export default class AuthService {
|
||||||
// SHA3-512 of '1234567890!@#$%^&*()_nothing_up_my_sleeve_1234567890!@#$%^&*()'
|
// SHA3-512 of '1234567890!@#$%^&*()_nothing_up_my_sleeve_1234567890!@#$%^&*()'
|
||||||
NO_AUTH_CREDS =
|
NO_AUTH_CREDS =
|
||||||
"55e97c9dcfd22b8079189ddaeea9bce8125887e3237b800c6176c9afa80d2062" +
|
'55e97c9dcfd22b8079189ddaeea9bce8125887e3237b800c6176c9afa80d2062' +
|
||||||
"8d2c8d0b1538d2208c1444ac66535b764a3d902b35e751df3faec1e477ed3557";
|
'8d2c8d0b1538d2208c1444ac66535b764a3d902b35e751df3faec1e477ed3557';
|
||||||
|
|
||||||
SECONDS_BEFORE_JWT_EXPIRES = 20;
|
SECONDS_BEFORE_JWT_EXPIRES = 20;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue