From f13edaad0093e8d424c1aa240cb9c693b7926b81 Mon Sep 17 00:00:00 2001 From: Zeeshan1234 Date: Fri, 29 Mar 2024 01:14:26 +0500 Subject: [PATCH 1/3] fix bonus payload issue --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index dad0436..05892b2 100644 --- a/index.js +++ b/index.js @@ -104,6 +104,12 @@ const juiceShopCtfCli = async () => { fetchCodeSnippets(answers.juiceShopUrl, argv.ignoreSslWarnings, answers.insertHintSnippets === options.noHintSnippets) ]) + for (const challenge of challenges) { + if (challenge.name === 'Bonus Payload') { + challenge.description = challenge.description.replace('https://', 'https%3A//'); + } + } + await generateCtfExport(answers.ctfFramework || options.ctfdFramework, challenges, { juiceShopUrl: answers.juiceShopUrl, insertHints: answers.insertHints, From 7a5b0de038651bb31b555a1ac1483126c5fac0aa Mon Sep 17 00:00:00 2001 From: Zeeshan1234 Date: Fri, 29 Mar 2024 01:18:37 +0500 Subject: [PATCH 2/3] npm link: remove semicolon --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 05892b2..a2f716d 100644 --- a/index.js +++ b/index.js @@ -106,10 +106,10 @@ const juiceShopCtfCli = async () => { for (const challenge of challenges) { if (challenge.name === 'Bonus Payload') { - challenge.description = challenge.description.replace('https://', 'https%3A//'); + challenge.description = challenge.description.replace('https://', 'https%3A//') } } - + await generateCtfExport(answers.ctfFramework || options.ctfdFramework, challenges, { juiceShopUrl: answers.juiceShopUrl, insertHints: answers.insertHints, From e5b4780c62780abdc73da5db5606e2b1fc99388e Mon Sep 17 00:00:00 2001 From: Zeeshan1234 Date: Fri, 29 Mar 2024 01:56:28 +0500 Subject: [PATCH 3/3] html encoding instead of URL encoding --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a2f716d..cb02c00 100644 --- a/index.js +++ b/index.js @@ -106,7 +106,7 @@ const juiceShopCtfCli = async () => { for (const challenge of challenges) { if (challenge.name === 'Bonus Payload') { - challenge.description = challenge.description.replace('https://', 'https%3A//') + challenge.description = challenge.description.replace('https://', 'https://') } }