UI: Adjust safe option validation to new schema

This commit is contained in:
vakarisz 2022-07-14 17:37:57 +03:00
parent 138a065d75
commit d2c8065163
2 changed files with 6 additions and 10 deletions

View File

@ -2,27 +2,27 @@ function getPluginDescriptors(schema, config) {
return ([ return ([
{ {
name: 'Brute force exploiters', 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 selectedPlugins: config.propagation.exploitation.brute_force
}, },
{ {
name: 'Vulnerability exploiters', name: 'Vulnerability exploiters',
allPlugins: schema.definitions.vulnerability_classes.anyOf, allPlugins: schema.properties.propagation.properties.exploitation.properties.vulnerability.items.anyOf,
selectedPlugins: config.propagation.exploitation.vulnerability selectedPlugins: config.propagation.exploitation.vulnerability
}, },
{ {
name: 'Fingerprinters', 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 selectedPlugins: config.propagation.network_scan.fingerprinters
}, },
{ {
name: 'PostBreachActions', name: 'PostBreachActions',
allPlugins: schema.definitions.post_breach_actions.anyOf, allPlugins: schema.properties.post_breach_actions.items.anyOf,
selectedPlugins: config.post_breach_actions selectedPlugins: config.post_breach_actions
}, },
{ {
name: 'CredentialCollectors', name: 'CredentialCollectors',
allPlugins: schema.definitions.credential_collectors_classes.anyOf, allPlugins: schema.properties.credential_collectors.items.anyOf,
selectedPlugins: config.credential_collectors selectedPlugins: config.credential_collectors
} }
]); ]);

View File

@ -21,11 +21,7 @@ export const SCHEMA = {
'title': 'Credential collectors', 'title': 'Credential collectors',
'type': 'array', 'type': 'array',
'uniqueItems': true, 'uniqueItems': true,
'items': CREDENTIAL_COLLECTORS, 'items': CREDENTIAL_COLLECTORS
'default': [
'MimikatzCollector',
'SSHCollector'
]
}, },
'advanced': { 'advanced': {
'title': 'Advanced', 'title': 'Advanced',