Skip to content

Commit

Permalink
Merge pull request #73 from pbnj-dragon/feat/template-urls
Browse files Browse the repository at this point in the history
feat: support template urls
  • Loading branch information
olearycrew authored Feb 2, 2024
2 parents 79e0c00 + e96b00a commit 5070332
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
required: false

templates:
description: "Templates input file/files to check across hosts"
description: "Templates input file(s)/URL to check across hosts"
required: false

workflows:
Expand Down
10 changes: 9 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ async function run() {
// Setting up params
if (target) params.push(`-target=${target}`);
if (urls) params.push(`-list=${urls}`);
if (templates) params.push(`-t=${templates}`);
if (templates) {
try {
new URL(templates)
params.push(`-turl=${templates}`);
}
catch(_) {
params.push(`-t=${templates}`);
}
}
if (workflows) params.push(`-w=${workflows}`);
params.push(`-se=${sarifExport ? sarifExport : 'nuclei.sarif'}`);
if (markdownExport) params.push(`-me=${markdownExport}`);
Expand Down

0 comments on commit 5070332

Please sign in to comment.