From 6067d2292e8a00d3ca31eba5ae4aad38aa5b5e15 Mon Sep 17 00:00:00 2001 From: Filippo Cavallarin Date: Mon, 28 Oct 2019 20:16:34 +0100 Subject: [PATCH] fix max execution time --- domdig.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/domdig.js b/domdig.js index 7b64d48..acc812d 100755 --- a/domdig.js +++ b/domdig.js @@ -95,9 +95,14 @@ async function crawlAndFuzz(targetUrl, payload, options){ } } - try{ + // workaround, fix it in htcrawl + let timeo = setTimeout(function(){ + crawler.stop(); + }, options.maxExecTime); + await crawler.start(); + clearTimeout(timeo); } catch(e){ console.log(`Error ${e}`); process.exit(-4);