Skip to content

Commit

Permalink
Renamed ronin-recon test to ronin-recon run-worker (closes #165).
Browse files Browse the repository at this point in the history
* Left behind an alias for `ronin-recon test` to
  `ronin-recon run-worker`.
  • Loading branch information
postmodern committed Aug 19, 2024
1 parent 4e5aa00 commit 032be97
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Commands:
irb
new
run
test
run-worker, test
worker
workers
```
Expand Down
2 changes: 1 addition & 1 deletion data/templates/worker.rb.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f

require 'ronin/recon/<%= @worker_type[:file] -%>'

Expand Down
2 changes: 1 addition & 1 deletion gemspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ generated_files:
- man/ronin-recon-new.1
- man/ronin-recon-workers.1
- man/ronin-recon-worker.1
- man/ronin-recon-test.1
- man/ronin-recon-run-worker.1
- man/ronin-recon-run.1
- data/wordlists/subdomains-1000.txt.gz
- data/wordlists/raft-small-directories.txt.gz
Expand Down
2 changes: 2 additions & 0 deletions lib/ronin/recon/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class CLI
command_name 'ronin-recon'
version Ronin::Recon::VERSION

command_aliases['test'] = 'run-worker'

end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ module Recon
class CLI
module Commands
#
# Loads an individual worker and tests it.
# Loads an individual worker and runs it.
#
# ## Usage
#
# ronin-recon test [options] {--file FILE | NAME} {IP | IP-range | DOMAIN | HOST | WILDCARD | WEBSITE}
# ronin-recon run-worker [options] {--file FILE | NAME} {IP | IP-range | DOMAIN | HOST | WILDCARD | WEBSITE}
#
# ## Options
#
Expand All @@ -47,7 +47,7 @@ module Commands
#
# IP|IP-range|DOMAIN|HOST|WILDCARD|WEBSITE An initial recon value.
#
class Test < WorkerCommand
class RunWorker < WorkerCommand

include DebugOption
include Printing
Expand All @@ -60,12 +60,12 @@ class Test < WorkerCommand
usage: 'IP|IP-range|DOMAIN|HOST|WILDCARD|WEBSITE',
desc: 'The initial recon value'

description 'Loads an individual worker and tests it'
description 'Loads an individual worker and runs it'

man_page 'ronin-recon-test.1'
man_page 'ronin-recon-run-worker.1'

#
# Runs the `ronin-recon test` command.
# Runs the `ronin-recon run-worker` command.
#
# @param [String, nil] name
# The optional worker name to load and print metadata for.
Expand Down
2 changes: 1 addition & 1 deletion man/ronin-recon-irb.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Postmodern <[email protected]>

## SEE ALSO

[ronin-recon-workers](ronin-recon-workers.1.md) [ronin-recon-worker](ronin-recon-worker.1.md) [ronin-recon-run](ronin-recon-run.1.md) [ronin-recon-test](ronin-recon-test.1.md)
[ronin-recon-workers](ronin-recon-workers.1.md) [ronin-recon-worker](ronin-recon-worker.1.md) [ronin-recon-run](ronin-recon-run.1.md) [ronin-recon-run-worker](ronin-recon-run-worker.1.md)
10 changes: 5 additions & 5 deletions man/ronin-recon-test.1.md → man/ronin-recon-run-worker.1.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# ronin-recon-test 1 "2023-05-01" Ronin "User Manuals"
# ronin-recon-run-worker 1 "2023-05-01" Ronin "User Manuals"

## NAME

ronin-recon-test - Loads an individual worker and tests it
ronin-recon-run-worker - Loads an individual worker and runs it

## SYNOPSIS

`ronin-recon test` [*options*] {`--file` *FILE* \| *NAME*} {*IP* \| *IP-range* \| *DOMAIN* \| *HOST* \| *WILDCARD* \| *WEBSITE*}
`ronin-recon run-worker` [*options*] {`--file` *FILE* \| *NAME*} {*IP* \| *IP-range* \| *DOMAIN* \| *HOST* \| *WILDCARD* \| *WEBSITE*}

## DESCRIPTION

Loads an individual worker and tests it with an input value..
Loads an individual worker and runs it with an input value..

## ARGUMENTS

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

## SEE ALSO

[ronin-recon-workers](ronin-recon-workers.1.md) [ronin-recon-run](ronin-recon-run.1.md)
[ronin-recon-workers](ronin-recon-workers.1.md) [ronin-recon-run](ronin-recon-run.1.md)
4 changes: 2 additions & 2 deletions man/ronin-recon-run.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ronin-recon-test 1 "2023-05-01" Ronin "User Manuals"
# ronin-recon-run-worker 1 "2023-05-01" Ronin "User Manuals"

## NAME

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

## SEE ALSO

[ronin-recon-workers](ronin-recon-workers.1.md) [ronin-recon-worker](ronin-recon-worker.1.md) [ronin-recon-test](ronin-recon-test.1.md)
[ronin-recon-workers](ronin-recon-workers.1.md) [ronin-recon-worker](ronin-recon-worker.1.md) [ronin-recon-run-worker](ronin-recon-run-worker.1.md)
4 changes: 2 additions & 2 deletions man/ronin-recon.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Runs a `ronin-recon` *COMMAND*.
*run*
: Runs the recon engine with one or more initial values.

*test*
: Loads an individual worker and tests it.
*run-worker*, *test*
: Loads an individual worker and runs it.

*worker*
: Prints information about a recon worker.
Expand Down
20 changes: 10 additions & 10 deletions spec/cli/commands/new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
it "must generate a new file containing a new Ronin::Recon::Worker class" do
expect(File.read(path)).to eq(
<<~RUBY
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f
require 'ronin/recon/worker'
Expand Down Expand Up @@ -131,7 +131,7 @@ def process(value)
it "must add a boilerplate `author` metadata attribute" do
expect(File.read(path)).to eq(
<<~RUBY
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f
require 'ronin/recon/worker'
Expand Down Expand Up @@ -173,7 +173,7 @@ def process(value)
it "must override the author name in the `author ...` metadata attribute with the '--author' name" do
expect(File.read(path)).to eq(
<<~RUBY
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f
require 'ronin/recon/worker'
Expand Down Expand Up @@ -214,7 +214,7 @@ def process(value)
it "must override the author email in the `author ...` metadata attribute with the '--author-email' email" do
expect(File.read(path)).to eq(
<<~RUBY
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f
require 'ronin/recon/worker'
Expand Down Expand Up @@ -257,7 +257,7 @@ def process(value)
it "must fill in the `summary ...` metadata attribute with the '--summary' text" do
expect(File.read(path)).to eq(
<<~RUBY
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f
require 'ronin/recon/worker'
Expand Down Expand Up @@ -299,7 +299,7 @@ def process(value)
it "must fill in the `description ...` metadata attribute with the '--description' text" do
expect(File.read(path)).to eq(
<<~RUBY
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f
require 'ronin/recon/worker'
Expand Down Expand Up @@ -344,7 +344,7 @@ def process(value)
it "must fill in the `references [...]` metadata attribute containing the '--reference' URLs" do
expect(File.read(path)).to eq(
<<~RUBY
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f
require 'ronin/recon/worker'
Expand Down Expand Up @@ -391,7 +391,7 @@ def process(value)
it "must set the `accepts ...` metadata attribute in the worker class with the '--accepts' value classes" do
expect(File.read(path)).to eq(
<<~RUBY
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f
require 'ronin/recon/worker'
Expand Down Expand Up @@ -438,7 +438,7 @@ def process(value)
it "must set the `outputs ...` metadata attribute in the worker class with the '--outputs' value classes" do
expect(File.read(path)).to eq(
<<~RUBY
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f
require 'ronin/recon/worker'
Expand Down Expand Up @@ -480,7 +480,7 @@ def process(value)
it "must add the `intensity :level` metadata attribute to the worker class using the '--intensity' level" do
expect(File.read(path)).to eq(
<<~RUBY
#!/usr/bin/env -S ronin-recon test -f
#!/usr/bin/env -S ronin-recon run-worker -f
require 'ronin/recon/worker'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require 'spec_helper'
require 'ronin/recon/cli/commands/test'
require 'ronin/recon/cli/commands/run_worker'

require 'fixtures/test_worker'

describe Ronin::Recon::CLI::Commands::Test do
describe Ronin::Recon::CLI::Commands::RunWorker do
describe "#run" do
let(:name) { 'test_worker' }
let(:value) { 'example.com' }
Expand Down

0 comments on commit 032be97

Please sign in to comment.