Skip to content

Commit

Permalink
Added --print-js-path-strings to ronin-web spider (closes #93).
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Jun 23, 2024
1 parent 95be0ec commit 933ad15
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/ronin/web/cli/commands/spider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ module Commands
# --save-certs Saves all encountered SSL/TLS certificates
# --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-html-comments Print HTML comments
# --print-js-comments Print JavaScript comments
# --print-comments Print all HTML and JavaScript comments
Expand Down Expand Up @@ -171,6 +172,8 @@ class Spider < Command

option :print_js_url_strings, desc: 'Print URL strings found in JavaScript'

option :print_js_path_strings, desc: 'Print path strings found in JavaScript'

option :print_html_comments, desc: 'Print HTML comments'

option :print_js_comments, desc: 'Print JavaScript comments'
Expand Down Expand Up @@ -291,6 +294,12 @@ def define_printing_callbacks(agent)
end
end

if options[:print_js_path_strings]
agent.every_js_path_string do |url|
print_content url
end
end

if options[:print_html_comments]
agent.every_html_comment do |comment|
print_content comment
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 @@ -179,6 +179,9 @@ Spiders a website.
`--print-js-url-strings`
: Print URL strings found in JavaScript.

`--print-js-path-strings`
: Print path strings found in JavaScript.

`--print-html-comments`
: Print HTML comments.

Expand Down

0 comments on commit 933ad15

Please sign in to comment.