From 84f550335321ec50d5e7f6ebade08aa101528b29 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Wed, 14 Feb 2024 08:17:56 -0800 Subject: [PATCH] Move the `--host`, `--site`, and `--domain` options up to the top. --- lib/ronin/web/cli/commands/spider.rb | 6 ++--- lib/ronin/web/cli/spider_options.rb | 35 ++++++++++++++-------------- man/ronin-web-spider.1.md | 20 ++++++++-------- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/lib/ronin/web/cli/commands/spider.rb b/lib/ronin/web/cli/commands/spider.rb index a22c48d0..fded0d68 100644 --- a/lib/ronin/web/cli/commands/spider.rb +++ b/lib/ronin/web/cli/commands/spider.rb @@ -42,6 +42,9 @@ module Commands # ## Options # # -v, --verbose Enables verbose output + # --host HOST Spiders the specific HOST + # --domain DOMAIN Spiders the whole domain + # --site URL Spiders the website, starting at the URL # --open-timeout SECS Sets the connection open timeout # --read-timeout SECS Sets the read timeout # --ssl-timeout SECS Sets the SSL connection timeout @@ -78,9 +81,6 @@ module Commands # --ignore-ext FILE_EXT Ignore the URLs with the file ext # --ignore-exts-like /REGEX/ Ignore URLs with file exts matching the REGEX # -r, --robots Specifies whether to honor robots.txt - # --host HOST Spiders the specific HOST - # --domain DOMAIN Spiders the whole domain - # --site URL Spiders the website, starting at the URL # --print-status Print the status codes for each URL # --print-headers Print response headers for each URL # --print-header NAME Prints a specific header diff --git a/lib/ronin/web/cli/spider_options.rb b/lib/ronin/web/cli/spider_options.rb index e60d5d61..36feab52 100644 --- a/lib/ronin/web/cli/spider_options.rb +++ b/lib/ronin/web/cli/spider_options.rb @@ -39,6 +39,23 @@ module SpiderOptions def self.included(command) command.usage '[options] {--host HOST | --domain DOMAIN | --site URL}' + command.option :host, value: { + type: String, + usage: 'HOST' + }, + desc: 'Spiders the specific HOST' + + command.option :domain, value: { + type: String, + usage: 'DOMAIN' + }, + desc: 'Spiders the whole domain' + + command.option :site, value: { + type: String, + usage: 'URL' + }, + desc: 'Spiders the website, starting at the URL' command.option :open_timeout, value: { type: Integer, usage: 'SECS', @@ -305,24 +322,6 @@ def self.included(command) command.option :robots, short: '-r', desc: 'Specifies whether to honor robots.txt' - - command.option :host, value: { - type: String, - usage: 'HOST' - }, - desc: 'Spiders the specific HOST' - - command.option :domain, value: { - type: String, - usage: 'DOMAIN' - }, - desc: 'Spiders the whole domain' - - command.option :site, value: { - type: String, - usage: 'URL' - }, - desc: 'Spiders the website, starting at the URL' end # The default HTTP headers to send with every request. diff --git a/man/ronin-web-spider.1.md b/man/ronin-web-spider.1.md index a129a9f0..7e706a7f 100644 --- a/man/ronin-web-spider.1.md +++ b/man/ronin-web-spider.1.md @@ -14,6 +14,15 @@ Spiders a website. ## OPTIONS +`--host` *HOST* +: Spiders the specific *HOST*. + +`--domain` *DOMAIN* +: Spiders the whole *DOMAIN*. + +`--site` *URL* +: Spiders the website, starting at the *URL*. + `--open-timeout` *SECS* : Sets the connection open timeout. @@ -119,15 +128,6 @@ Spiders a website. `-r`, `--robots` : Specifies whether to honor `robots.txt`. -`--host` *HOST* -: Spiders the specific *HOST*. - -`--domain` *DOMAIN* -: Spiders the whole *DOMAIN*. - -`--site` *URL* -: Spiders the website, starting at the *URL*. - `--print-status` : Print the status codes for each URL. @@ -172,4 +172,4 @@ Postmodern ## SEE ALSO -[ronin-web-server](ronin-web-server.1.md) [ronin-web-proxy](ronin-web-proxy.1.md) [ronin-web-diff](ronin-web-diff.1.md) [ronin-web-new-spider](ronin-web-new-spider.1.md) \ No newline at end of file +[ronin-web-server](ronin-web-server.1.md) [ronin-web-proxy](ronin-web-proxy.1.md) [ronin-web-diff](ronin-web-diff.1.md) [ronin-web-new-spider](ronin-web-new-spider.1.md)