Island: Remove "default" exploits display in report

I'm not sure why this decision was made. It seems to me you'd always
want to display which exploiters were enabled during the simulation.
Telling me it was "default" means I need to go look up what the defaults
are in order to understand the report.
This commit is contained in:
Mike Salvatore 2022-07-13 13:07:31 -04:00
parent db4520af50
commit 46a71ff8f1
2 changed files with 6 additions and 18 deletions

View File

@ -391,15 +391,8 @@ class ReportService:
@staticmethod
def get_config_exploits():
exploits_config_value = EXPLOITER_CLASSES_PATH
# TODO: Return default config here
default_exploits = ConfigService.get_default_config(False)
for namespace in exploits_config_value:
default_exploits = default_exploits[namespace]
exploits = ConfigService.get_config_value(exploits_config_value, True)
if exploits == default_exploits:
return ["default"]
return [
ExploiterDescriptorEnum.get_by_class_name(exploit).display_name for exploit in exploits
]

View File

@ -297,17 +297,12 @@ class ReportPageComponent extends AuthComponent {
}
{
this.state.report.overview.config_exploits.length > 0 ?
(
this.state.report.overview.config_exploits[0] === 'default' ?
''
:
<p>
The Monkey uses the following exploit methods:
<ul>
{this.state.report.overview.config_exploits.map(x => <li key={x}>{x}</li>)}
</ul>
</p>
)
<p>
The Monkey uses the following exploit methods:
<ul>
{this.state.report.overview.config_exploits.map(x => <li key={x}>{x}</li>)}
</ul>
</p>
:
<p>
No exploits are used by the Monkey.