Skip to content

Commit

Permalink
Added --print-js-absolute-path-strings to ronin-web spider (closes
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Jun 23, 2024
1 parent 8bf60a4 commit 1c0e451
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/ronin/web/cli/commands/spider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions man/ronin-web-spider.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 1c0e451

Please sign in to comment.