fase(6): fuzzing module complete
This commit is contained in:
26
dist/modules/fuzzing/application/event-handlers/OnActionExecuted.js
vendored
Normal file
26
dist/modules/fuzzing/application/event-handlers/OnActionExecuted.js
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.OnActionExecuted = void 0;
|
||||
/**
|
||||
* Listens for action_executed events from crawling module
|
||||
* and triggers fuzzing on the resulting state's DOM.
|
||||
*/
|
||||
class OnActionExecuted {
|
||||
constructor(runFuzz) {
|
||||
this.runFuzz = runFuzz;
|
||||
}
|
||||
async handle(event) {
|
||||
const payload = event.payload;
|
||||
if (!payload.state || !payload.sessionId)
|
||||
return;
|
||||
if (!payload.state.domSnapshot)
|
||||
return;
|
||||
await this.runFuzz.execute({
|
||||
crawlSessionId: payload.sessionId,
|
||||
intensity: payload.intensity ?? 'low',
|
||||
seed: payload.action?.seed ?? Date.now(),
|
||||
state: payload.state,
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.OnActionExecuted = OnActionExecuted;
|
||||
Reference in New Issue
Block a user