Store converted techniques' messages (markdown to HTML) separately

This commit is contained in:
Shreya 2021-01-29 18:48:48 +05:30 committed by Mike Salvatore
parent a5acf4c4b5
commit c8c763d918
37 changed files with 38 additions and 38 deletions

View File

@ -14,7 +14,7 @@ class T1003 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<StolenPasswordsComponent <StolenPasswordsComponent

View File

@ -28,7 +28,7 @@ class T1005 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -28,7 +28,7 @@ class T1016 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -42,7 +42,7 @@ class T1018 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -41,7 +41,7 @@ class T1021 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -13,7 +13,7 @@ class T1035 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.services.length !== 0 ? {this.props.data.services.length !== 0 ?
<ReactTable <ReactTable

View File

@ -22,7 +22,7 @@ class T1041 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1053 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -30,7 +30,7 @@ class T1059 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -13,7 +13,7 @@ class T1064 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.scripts.length !== 0 ? {this.props.data.scripts.length !== 0 ?
<ReactTable <ReactTable

View File

@ -7,7 +7,7 @@ class T1065 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<MitigationsComponent mitigations={this.props.data.mitigations}/> <MitigationsComponent mitigations={this.props.data.mitigations}/>
</div> </div>
); );

View File

@ -33,7 +33,7 @@ class T1075 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -32,7 +32,7 @@ class T1082 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -35,7 +35,7 @@ class T1086 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1087 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -25,7 +25,7 @@ class T1090 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1099 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -24,7 +24,7 @@ class T1105 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status !== ScanStatus.UNSCANNED ? {this.props.data.status !== ScanStatus.UNSCANNED ?
<ReactTable <ReactTable

View File

@ -13,7 +13,7 @@ class T1106 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.api_uses.length !== 0 ? {this.props.data.api_uses.length !== 0 ?
<ReactTable <ReactTable

View File

@ -38,7 +38,7 @@ class T1107 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.deleted_files.length !== 0 ? {this.props.data.deleted_files.length !== 0 ?
<ReactTable <ReactTable

View File

@ -38,7 +38,7 @@ class T1110 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status !== ScanStatus.UNSCANNED ? {this.props.data.status !== ScanStatus.UNSCANNED ?
<ReactTable <ReactTable

View File

@ -12,7 +12,7 @@ class T1129 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.dlls.length !== 0 ? {this.props.data.dlls.length !== 0 ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1136 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -41,7 +41,7 @@ class T1145 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1146 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1154 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1156 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1158 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1166 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1168 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -39,7 +39,7 @@ class T1188 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -45,7 +45,7 @@ class T1210 extends React.Component {
return ( return (
<div className="data-table-container"> <div className="data-table-container">
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
{this.props.data.bits_jobs.length > 0 ? <div>BITS jobs were used in these machines: </div> : ''} {this.props.data.bits_jobs.length > 0 ? <div>BITS jobs were used in these machines: </div> : ''}
</div> </div>
<br/> <br/>

View File

@ -95,7 +95,7 @@ class T1210 extends React.Component {
let scanned_services = this.props.data.scanned_services.map(T1210.formatScanned).flat(); let scanned_services = this.props.data.scanned_services.map(T1210.formatScanned).flat();
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
{scanned_services.length > 0 ? {scanned_services.length > 0 ?
this.renderScannedServices(scanned_services) : ''} this.renderScannedServices(scanned_services) : ''}
{this.props.data.exploited_services.length > 0 ? {this.props.data.exploited_services.length > 0 ?

View File

@ -27,7 +27,7 @@ class T1216 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -23,7 +23,7 @@ class T1222 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -27,7 +27,7 @@ class T1504 extends React.Component {
render() { render() {
return ( return (
<div> <div>
<div>{this.props.data.message}</div> <div>{this.props.data.message_html}</div>
<br/> <br/>
{this.props.data.status === ScanStatus.USED ? {this.props.data.status === ScanStatus.USED ?
<ReactTable <ReactTable

View File

@ -157,9 +157,9 @@ class AttackReport extends React.Component {
} }
} }
} }
// modify techniques' messages // compiles techniques' message string from markdown to HTML
for (const tech_id in techniques){ for (const tech_id in techniques){
techniques[tech_id]['message'] = <div dangerouslySetInnerHTML={{__html: marked(techniques[tech_id]['message'])}} />; techniques[tech_id]['message_html'] = <div dangerouslySetInnerHTML={{__html: marked(techniques[tech_id]['message'])}} />;
} }
return techniques return techniques