Skip to content

Commit

Permalink
Move the --host, --site, and --domain options up to the top.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Feb 14, 2024
1 parent 37f6146 commit 84f5503
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
6 changes: 3 additions & 3 deletions lib/ronin/web/cli/commands/spider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
35 changes: 17 additions & 18 deletions lib/ronin/web/cli/spider_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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.
Expand Down
20 changes: 10 additions & 10 deletions man/ronin-web-spider.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -172,4 +172,4 @@ Postmodern <[email protected]>

## 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)
[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)

0 comments on commit 84f5503

Please sign in to comment.