forked from p15670423/monkey
UI: Fix SafeOptionValidator.js for the new schema
This commit is contained in:
parent
88663f5276
commit
df7e43d796
|
@ -1,24 +1,29 @@
|
||||||
function getPluginDescriptors(schema, config) {
|
function getPluginDescriptors(schema, config) {
|
||||||
return ([
|
return ([
|
||||||
{
|
{
|
||||||
name: 'Exploiters',
|
name: 'Brute force exploiters',
|
||||||
allPlugins: schema.definitions.exploiter_classes.anyOf,
|
allPlugins: schema.definitions.brute_force_classes.anyOf,
|
||||||
selectedPlugins: config.basic.exploiters.exploiter_classes
|
selectedPlugins: config.propagation.exploitation.brute_force
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Vulnerability exploiters',
|
||||||
|
allPlugins: schema.definitions.vulnerability_classes.anyOf,
|
||||||
|
selectedPlugins: config.propagation.exploitation.vulnerability
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Fingerprinters',
|
name: 'Fingerprinters',
|
||||||
allPlugins: schema.definitions.finger_classes.anyOf,
|
allPlugins: schema.definitions.fingerprinter_classes.anyOf,
|
||||||
selectedPlugins: config.internal.classes.finger_classes
|
selectedPlugins: config.propagation.network_scan.fingerprinters
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'PostBreachActions',
|
name: 'PostBreachActions',
|
||||||
allPlugins: schema.definitions.post_breach_actions.anyOf,
|
allPlugins: schema.definitions.post_breach_actions.anyOf,
|
||||||
selectedPlugins: config.monkey.post_breach.post_breach_actions
|
selectedPlugins: config.post_breach_actions
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'CredentialCollectors',
|
name: 'CredentialCollectors',
|
||||||
allPlugins: schema.definitions.credential_collectors.anyOf,
|
allPlugins: schema.definitions.credential_collectors_classes.anyOf,
|
||||||
selectedPlugins: config.monkey.credential_collectors.credential_collectors
|
selectedPlugins: config.credential_collectors
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +45,7 @@ function isUnsafePluginSelected(pluginDescriptor) {
|
||||||
pluginDescriptor.allPlugins.forEach(i => pluginSafety[i.enum[0]] = i.safe);
|
pluginDescriptor.allPlugins.forEach(i => pluginSafety[i.enum[0]] = i.safe);
|
||||||
|
|
||||||
for (let selected of pluginDescriptor.selectedPlugins) {
|
for (let selected of pluginDescriptor.selectedPlugins) {
|
||||||
if (!pluginSafety[selected]) {
|
if (!pluginSafety[selected.name]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue