From d2c8065163326d1df06692ecada0596f0b46627b Mon Sep 17 00:00:00 2001 From: vakarisz Date: Thu, 14 Jul 2022 17:37:57 +0300 Subject: [PATCH] UI: Adjust safe option validation to new schema --- .../cc/ui/src/components/utils/SafeOptionValidator.js | 10 +++++----- .../cc/ui/src/services/configuration/configSchema.js | 6 +----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/utils/SafeOptionValidator.js b/monkey/monkey_island/cc/ui/src/components/utils/SafeOptionValidator.js index 52aec245d..2f9e88298 100644 --- a/monkey/monkey_island/cc/ui/src/components/utils/SafeOptionValidator.js +++ b/monkey/monkey_island/cc/ui/src/components/utils/SafeOptionValidator.js @@ -2,27 +2,27 @@ function getPluginDescriptors(schema, config) { return ([ { name: 'Brute force exploiters', - allPlugins: schema.definitions.brute_force_classes.anyOf, + allPlugins: schema.properties.propagation.properties.exploitation.properties.brute_force.items.anyOf, selectedPlugins: config.propagation.exploitation.brute_force }, { name: 'Vulnerability exploiters', - allPlugins: schema.definitions.vulnerability_classes.anyOf, + allPlugins: schema.properties.propagation.properties.exploitation.properties.vulnerability.items.anyOf, selectedPlugins: config.propagation.exploitation.vulnerability }, { name: 'Fingerprinters', - allPlugins: schema.definitions.fingerprinter_classes.anyOf, + allPlugins: schema.properties.propagation.properties.network_scan.properties.fingerprinters.items.anyOf, selectedPlugins: config.propagation.network_scan.fingerprinters }, { name: 'PostBreachActions', - allPlugins: schema.definitions.post_breach_actions.anyOf, + allPlugins: schema.properties.post_breach_actions.items.anyOf, selectedPlugins: config.post_breach_actions }, { name: 'CredentialCollectors', - allPlugins: schema.definitions.credential_collectors_classes.anyOf, + allPlugins: schema.properties.credential_collectors.items.anyOf, selectedPlugins: config.credential_collectors } ]); diff --git a/monkey/monkey_island/cc/ui/src/services/configuration/configSchema.js b/monkey/monkey_island/cc/ui/src/services/configuration/configSchema.js index 539bbb71e..1aa888a9e 100644 --- a/monkey/monkey_island/cc/ui/src/services/configuration/configSchema.js +++ b/monkey/monkey_island/cc/ui/src/services/configuration/configSchema.js @@ -21,11 +21,7 @@ export const SCHEMA = { 'title': 'Credential collectors', 'type': 'array', 'uniqueItems': true, - 'items': CREDENTIAL_COLLECTORS, - 'default': [ - 'MimikatzCollector', - 'SSHCollector' - ] + 'items': CREDENTIAL_COLLECTORS }, 'advanced': { 'title': 'Advanced',