diff --git a/lib/ronin/web/cli/commands/spider.rb b/lib/ronin/web/cli/commands/spider.rb index 7f0afd8..5130395 100644 --- a/lib/ronin/web/cli/commands/spider.rb +++ b/lib/ronin/web/cli/commands/spider.rb @@ -100,6 +100,8 @@ module Commands # --print-js-strings Print all JavaScript strings # --print-js-url-strings Print URL strings found in JavaScript # --print-js-path-strings Print path strings found in JavaScript + # --print-js-absolute-path-strings + # Only print absolute path strings found in JavaScript # --print-js-relative-path-strings # Only print relative path strings found in JavaScript # --print-html-comments Print HTML comments @@ -176,6 +178,8 @@ class Spider < Command option :print_js_path_strings, desc: 'Print path strings found in JavaScript' + option :print_js_absolute_path_strings, desc: 'Only print absolute path strings found in JavaScript' + option :print_js_relative_path_strings, desc: 'Only print relative path strings found in JavaScript' option :print_html_comments, desc: 'Print HTML comments' @@ -304,6 +308,12 @@ def define_printing_callbacks(agent) end end + if options[:print_js_absolute_path_strings] + agent.every_js_absolute_path_string do |path| + print_content path + end + end + if options[:print_js_relative_path_strings] agent.every_js_relative_path_string do |path| print_content path diff --git a/man/ronin-web-spider.1.md b/man/ronin-web-spider.1.md index 949043e..1d7694c 100644 --- a/man/ronin-web-spider.1.md +++ b/man/ronin-web-spider.1.md @@ -182,6 +182,9 @@ Spiders a website. `--print-js-path-strings` : Print path strings found in JavaScript. +`--print-js-absolute-path-strings` +: Only print absolute path strings found in JavaScript. + `--print-js-relative-path-strings` : Only print relative path strings found in JavaScript.