ronin-recon 0.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +4 -0
- data/.github/workflows/ruby.yml +46 -0
- data/.gitignore +20 -0
- data/.rspec +1 -0
- data/.rubocop.yml +44 -0
- data/.ruby-version +1 -0
- data/.yardopts +1 -0
- data/COPYING.txt +165 -0
- data/ChangeLog.md +36 -0
- data/Gemfile +62 -0
- data/README.md +391 -0
- data/Rakefile +74 -0
- data/bin/ronin-recon +16 -0
- data/data/completions/ronin-recon +95 -0
- data/data/templates/worker.rb.erb +67 -0
- data/data/wordlists/raft-small-directories.txt.gz +0 -0
- data/data/wordlists/subdomains-1000.txt.gz +0 -0
- data/examples/recon.rb +24 -0
- data/gemspec.yml +57 -0
- data/lib/ronin/recon/builtin/dns/lookup.rb +65 -0
- data/lib/ronin/recon/builtin/dns/mailservers.rb +64 -0
- data/lib/ronin/recon/builtin/dns/nameservers.rb +61 -0
- data/lib/ronin/recon/builtin/dns/reverse_lookup.rb +63 -0
- data/lib/ronin/recon/builtin/dns/srv_enum.rb +178 -0
- data/lib/ronin/recon/builtin/dns/subdomain_enum.rb +105 -0
- data/lib/ronin/recon/builtin/dns/suffix_enum.rb +168 -0
- data/lib/ronin/recon/builtin/net/ip_range_enum.rb +65 -0
- data/lib/ronin/recon/builtin/net/port_scan.rb +84 -0
- data/lib/ronin/recon/builtin/net/service_id.rb +75 -0
- data/lib/ronin/recon/builtin/ssl/cert_enum.rb +109 -0
- data/lib/ronin/recon/builtin/ssl/cert_grab.rb +76 -0
- data/lib/ronin/recon/builtin/ssl/cert_sh.rb +77 -0
- data/lib/ronin/recon/builtin/web/dir_enum.rb +121 -0
- data/lib/ronin/recon/builtin/web/email_addresses.rb +70 -0
- data/lib/ronin/recon/builtin/web/spider.rb +93 -0
- data/lib/ronin/recon/builtin.rb +34 -0
- data/lib/ronin/recon/cli/command.rb +40 -0
- data/lib/ronin/recon/cli/commands/completion.rb +61 -0
- data/lib/ronin/recon/cli/commands/irb.rb +57 -0
- data/lib/ronin/recon/cli/commands/new.rb +203 -0
- data/lib/ronin/recon/cli/commands/run.rb +420 -0
- data/lib/ronin/recon/cli/commands/test.rb +99 -0
- data/lib/ronin/recon/cli/commands/worker.rb +114 -0
- data/lib/ronin/recon/cli/commands/workers.rb +80 -0
- data/lib/ronin/recon/cli/debug_option.rb +45 -0
- data/lib/ronin/recon/cli/printing.rb +122 -0
- data/lib/ronin/recon/cli/ruby_shell.rb +51 -0
- data/lib/ronin/recon/cli/worker_command.rb +105 -0
- data/lib/ronin/recon/cli.rb +50 -0
- data/lib/ronin/recon/config.rb +371 -0
- data/lib/ronin/recon/dns_worker.rb +41 -0
- data/lib/ronin/recon/engine.rb +639 -0
- data/lib/ronin/recon/exceptions.rb +45 -0
- data/lib/ronin/recon/graph.rb +127 -0
- data/lib/ronin/recon/importer.rb +224 -0
- data/lib/ronin/recon/input_file.rb +81 -0
- data/lib/ronin/recon/message/job_completed.rb +60 -0
- data/lib/ronin/recon/message/job_failed.rb +69 -0
- data/lib/ronin/recon/message/job_started.rb +60 -0
- data/lib/ronin/recon/message/shutdown.rb +38 -0
- data/lib/ronin/recon/message/value.rb +76 -0
- data/lib/ronin/recon/message/worker_started.rb +51 -0
- data/lib/ronin/recon/message/worker_stopped.rb +51 -0
- data/lib/ronin/recon/mixins/dns.rb +639 -0
- data/lib/ronin/recon/mixins/http.rb +58 -0
- data/lib/ronin/recon/mixins.rb +21 -0
- data/lib/ronin/recon/output_formats/dir.rb +94 -0
- data/lib/ronin/recon/output_formats/dot.rb +155 -0
- data/lib/ronin/recon/output_formats/graph_format.rb +48 -0
- data/lib/ronin/recon/output_formats/graphviz_format.rb +115 -0
- data/lib/ronin/recon/output_formats/pdf.rb +43 -0
- data/lib/ronin/recon/output_formats/png.rb +43 -0
- data/lib/ronin/recon/output_formats/svg.rb +43 -0
- data/lib/ronin/recon/output_formats.rb +48 -0
- data/lib/ronin/recon/registry.rb +35 -0
- data/lib/ronin/recon/root.rb +33 -0
- data/lib/ronin/recon/scope.rb +112 -0
- data/lib/ronin/recon/value/parser.rb +113 -0
- data/lib/ronin/recon/value.rb +110 -0
- data/lib/ronin/recon/value_status.rb +87 -0
- data/lib/ronin/recon/values/cert.rb +168 -0
- data/lib/ronin/recon/values/domain.rb +88 -0
- data/lib/ronin/recon/values/email_address.rb +114 -0
- data/lib/ronin/recon/values/host.rb +137 -0
- data/lib/ronin/recon/values/ip.rb +123 -0
- data/lib/ronin/recon/values/ip_range.rb +155 -0
- data/lib/ronin/recon/values/mailserver.rb +61 -0
- data/lib/ronin/recon/values/nameserver.rb +61 -0
- data/lib/ronin/recon/values/open_port.rb +190 -0
- data/lib/ronin/recon/values/url.rb +218 -0
- data/lib/ronin/recon/values/website.rb +200 -0
- data/lib/ronin/recon/values/wildcard.rb +140 -0
- data/lib/ronin/recon/values.rb +32 -0
- data/lib/ronin/recon/version.rb +26 -0
- data/lib/ronin/recon/web_worker.rb +35 -0
- data/lib/ronin/recon/worker.rb +433 -0
- data/lib/ronin/recon/worker_pool.rb +203 -0
- data/lib/ronin/recon/workers.rb +260 -0
- data/lib/ronin/recon.rb +22 -0
- data/man/ronin-recon-completion.1 +76 -0
- data/man/ronin-recon-completion.1.md +78 -0
- data/man/ronin-recon-irb.1 +27 -0
- data/man/ronin-recon-irb.1.md +26 -0
- data/man/ronin-recon-new.1 +58 -0
- data/man/ronin-recon-new.1.md +59 -0
- data/man/ronin-recon-run.1 +137 -0
- data/man/ronin-recon-run.1.md +115 -0
- data/man/ronin-recon-test.1 +53 -0
- data/man/ronin-recon-test.1.md +55 -0
- data/man/ronin-recon-worker.1 +32 -0
- data/man/ronin-recon-worker.1.md +34 -0
- data/man/ronin-recon-workers.1 +29 -0
- data/man/ronin-recon-workers.1.md +31 -0
- data/man/ronin-recon.1 +57 -0
- data/man/ronin-recon.1.md +57 -0
- data/ronin-recon.gemspec +62 -0
- data/scripts/setup +58 -0
- metadata +364 -0
@@ -0,0 +1,203 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
3
|
+
# ronin-recon - A micro-framework and tool for performing reconnaissance.
|
4
|
+
#
|
5
|
+
# Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
|
6
|
+
#
|
7
|
+
# ronin-recon is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published
|
9
|
+
# by the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# ronin-recon is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU Lesser General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
18
|
+
# along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
|
19
|
+
#
|
20
|
+
|
21
|
+
require 'ronin/recon/message/value'
|
22
|
+
require 'ronin/recon/message/worker_started'
|
23
|
+
require 'ronin/recon/message/worker_stopped'
|
24
|
+
require 'ronin/recon/message/job_started'
|
25
|
+
require 'ronin/recon/message/job_completed'
|
26
|
+
require 'ronin/recon/message/job_failed'
|
27
|
+
require 'ronin/recon/message/shutdown'
|
28
|
+
require 'ronin/core/params/mixin'
|
29
|
+
|
30
|
+
require 'async/queue'
|
31
|
+
|
32
|
+
module Ronin
|
33
|
+
module Recon
|
34
|
+
#
|
35
|
+
# Contains the `Async::Task` objects for a worker, that process messages
|
36
|
+
# from the input queue and sends messages to the output queue.
|
37
|
+
#
|
38
|
+
# @api private
|
39
|
+
#
|
40
|
+
class WorkerPool
|
41
|
+
|
42
|
+
# The recon worker's ID.
|
43
|
+
#
|
44
|
+
# @return [String]
|
45
|
+
attr_reader :id
|
46
|
+
|
47
|
+
# The number of async worker tasks to spawn.
|
48
|
+
#
|
49
|
+
# @return [Integer]
|
50
|
+
attr_reader :concurrency
|
51
|
+
|
52
|
+
# The worker object.
|
53
|
+
#
|
54
|
+
# @return [Worker]
|
55
|
+
attr_reader :worker
|
56
|
+
|
57
|
+
# The input queue for the worker(s).
|
58
|
+
#
|
59
|
+
# @return [Async::Queue]
|
60
|
+
attr_reader :input_queue
|
61
|
+
|
62
|
+
# The output queue for the worker(s).
|
63
|
+
#
|
64
|
+
# @return [Async::Queue]
|
65
|
+
attr_reader :output_queue
|
66
|
+
|
67
|
+
# The logger for debug messages.
|
68
|
+
#
|
69
|
+
# @return [Console::Logger]
|
70
|
+
attr_reader :logger
|
71
|
+
|
72
|
+
#
|
73
|
+
# Initializes the worker pool.
|
74
|
+
#
|
75
|
+
# @param [Worker] worker
|
76
|
+
# The initialized worker object.
|
77
|
+
#
|
78
|
+
# @param [Integer, nil] concurrency
|
79
|
+
# The number of async tasks to spawn.
|
80
|
+
#
|
81
|
+
# @param [Async::Queue] output_queue
|
82
|
+
# The output queue to send discovered values to.
|
83
|
+
#
|
84
|
+
# @param [Console::Logger] logger
|
85
|
+
# The console logger object.
|
86
|
+
#
|
87
|
+
def initialize(worker, concurrency: nil,
|
88
|
+
output_queue: ,
|
89
|
+
params: nil,
|
90
|
+
logger: Console.logger)
|
91
|
+
@worker = worker
|
92
|
+
@concurrency = concurrency || worker.class.concurrency
|
93
|
+
|
94
|
+
@input_queue = Async::Queue.new
|
95
|
+
@output_queue = output_queue
|
96
|
+
|
97
|
+
@logger = logger
|
98
|
+
|
99
|
+
@tasks = nil
|
100
|
+
end
|
101
|
+
|
102
|
+
#
|
103
|
+
# Routes a message to the worker.
|
104
|
+
#
|
105
|
+
# @param [Message::Value, Message::STOP] mesg
|
106
|
+
# The message to route.
|
107
|
+
#
|
108
|
+
def enqueue_mesg(mesg)
|
109
|
+
case mesg
|
110
|
+
when Message::SHUTDOWN
|
111
|
+
# push the Stop message for each worker task
|
112
|
+
@concurrency.times do
|
113
|
+
@input_queue.enqueue(mesg)
|
114
|
+
end
|
115
|
+
else
|
116
|
+
@input_queue.enqueue(mesg)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
#
|
121
|
+
# Runs the worker.
|
122
|
+
#
|
123
|
+
def run
|
124
|
+
# HACK: for some reason `until (mesg = ...) == Message::SHUTDOWn)`
|
125
|
+
# causes `Message::SHUTDOWN` objects to slip by. Changing it to a
|
126
|
+
# `loop do` fixes this for some reason.
|
127
|
+
loop do
|
128
|
+
if (mesg = @input_queue.dequeue) == Message::SHUTDOWN
|
129
|
+
break
|
130
|
+
end
|
131
|
+
|
132
|
+
value = mesg.value
|
133
|
+
|
134
|
+
enqueue(Message::JobStarted.new(@worker,value))
|
135
|
+
|
136
|
+
begin
|
137
|
+
@worker.process(value) do |result|
|
138
|
+
@logger.debug("Output value yielded: #{@worker} #{value.inspect} -> #{result.inspect}")
|
139
|
+
|
140
|
+
new_value = Message::Value.new(result, worker: @worker,
|
141
|
+
parent: value,
|
142
|
+
depth: mesg.depth + 1)
|
143
|
+
|
144
|
+
enqueue(new_value)
|
145
|
+
end
|
146
|
+
|
147
|
+
enqueue(Message::JobCompleted.new(@worker,value))
|
148
|
+
rescue StandardError => error
|
149
|
+
enqueue(Message::JobFailed.new(@worker,value,error))
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
stopped!
|
154
|
+
end
|
155
|
+
|
156
|
+
#
|
157
|
+
# Starts the worker pool.
|
158
|
+
#
|
159
|
+
# @param [Async::Task] task
|
160
|
+
# The optional async task to register the worker under.
|
161
|
+
#
|
162
|
+
def start(task=Async::Task.current)
|
163
|
+
# mark the worker as running
|
164
|
+
started!
|
165
|
+
|
166
|
+
@tasks = []
|
167
|
+
|
168
|
+
@concurrency.times do
|
169
|
+
@tasks << task.async { run }
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
#
|
174
|
+
# Marks the worker pool as running.
|
175
|
+
#
|
176
|
+
def started!
|
177
|
+
# send a message to the engine that the worker pool has started
|
178
|
+
enqueue(Message::WorkerStarted.new(@worker))
|
179
|
+
end
|
180
|
+
|
181
|
+
#
|
182
|
+
# Marks the worker pool as stopped.
|
183
|
+
#
|
184
|
+
def stopped!
|
185
|
+
# send a message to the engine that the worker pool has stopped
|
186
|
+
enqueue(Message::WorkerStopped.new(@worker))
|
187
|
+
end
|
188
|
+
|
189
|
+
private
|
190
|
+
|
191
|
+
#
|
192
|
+
# Sends a message to the output queue.
|
193
|
+
#
|
194
|
+
# @param [Message::JobStarted, Message::JobCompleted, Message::JobFailed, Message::Value] mesg
|
195
|
+
# The message object to enqueue.
|
196
|
+
#
|
197
|
+
def enqueue(mesg)
|
198
|
+
@output_queue.enqueue(mesg)
|
199
|
+
end
|
200
|
+
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
@@ -0,0 +1,260 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
3
|
+
# ronin-recon - A micro-framework and tool for performing reconnaissance.
|
4
|
+
#
|
5
|
+
# Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
|
6
|
+
#
|
7
|
+
# ronin-recon is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published
|
9
|
+
# by the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# ronin-recon is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU Lesser General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
18
|
+
# along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
|
19
|
+
#
|
20
|
+
|
21
|
+
require 'ronin/recon/registry'
|
22
|
+
|
23
|
+
require 'set'
|
24
|
+
|
25
|
+
module Ronin
|
26
|
+
module Recon
|
27
|
+
#
|
28
|
+
# Represents a set of recon worker classes.
|
29
|
+
#
|
30
|
+
# @api private
|
31
|
+
#
|
32
|
+
class Workers
|
33
|
+
|
34
|
+
include Enumerable
|
35
|
+
|
36
|
+
# The worker classes in the set.
|
37
|
+
#
|
38
|
+
# @return [Set<Class<Worker>>]
|
39
|
+
attr_reader :classes
|
40
|
+
|
41
|
+
#
|
42
|
+
# Initializes the workers.
|
43
|
+
#
|
44
|
+
# @param [Array<Class<Worker>>, Set<Class<Worker>>] workers
|
45
|
+
# The set of worker classes.
|
46
|
+
#
|
47
|
+
def initialize(workers=Set.new)
|
48
|
+
@classes = workers.to_set
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Loads the worker classes.
|
53
|
+
#
|
54
|
+
# @param [Enumerable<String>] worker_ids
|
55
|
+
# The list of worker IDs to load.
|
56
|
+
#
|
57
|
+
# @return [Workers]
|
58
|
+
#
|
59
|
+
def self.load(worker_ids)
|
60
|
+
workers = new
|
61
|
+
|
62
|
+
worker_ids.each do |worker_id|
|
63
|
+
workers.load(worker_id)
|
64
|
+
end
|
65
|
+
|
66
|
+
return workers
|
67
|
+
end
|
68
|
+
|
69
|
+
#
|
70
|
+
# Alias for {load}.
|
71
|
+
#
|
72
|
+
# @param [Array<String>] worker_ids
|
73
|
+
# The array of worker IDs to load.
|
74
|
+
#
|
75
|
+
# @return [Workers]
|
76
|
+
#
|
77
|
+
def self.[](*worker_ids)
|
78
|
+
load(worker_ids)
|
79
|
+
end
|
80
|
+
|
81
|
+
#
|
82
|
+
# Loads all workers.
|
83
|
+
#
|
84
|
+
# @return [Workers]
|
85
|
+
#
|
86
|
+
def self.all
|
87
|
+
load(Recon.list_files)
|
88
|
+
end
|
89
|
+
|
90
|
+
#
|
91
|
+
# Loads all workers under a specific category.
|
92
|
+
#
|
93
|
+
# @param [String] name
|
94
|
+
# The category name.
|
95
|
+
#
|
96
|
+
# @return [Workers]
|
97
|
+
#
|
98
|
+
def self.category(name)
|
99
|
+
load(
|
100
|
+
Recon.list_files.select { |worker_id|
|
101
|
+
worker_id.start_with?("#{name}/")
|
102
|
+
}
|
103
|
+
)
|
104
|
+
end
|
105
|
+
|
106
|
+
#
|
107
|
+
# Enumerates over the worker classes within the set.
|
108
|
+
#
|
109
|
+
# @yield [worker]
|
110
|
+
# If a block is given, it will be passed every worker class within the
|
111
|
+
# set.
|
112
|
+
#
|
113
|
+
# @yieldparam [Class<Worker>] worker
|
114
|
+
# A worker class within the set.
|
115
|
+
#
|
116
|
+
# @return [Enumerator]
|
117
|
+
# If no block is given, an Enumerator object will be returned.
|
118
|
+
#
|
119
|
+
def each(&block)
|
120
|
+
@classes.each(&block)
|
121
|
+
end
|
122
|
+
|
123
|
+
#
|
124
|
+
# Adds another set of workers to the workers.
|
125
|
+
#
|
126
|
+
# @param [Workers, Array<Class<Worker>>] other
|
127
|
+
#
|
128
|
+
# @return [Workers]
|
129
|
+
#
|
130
|
+
def +(other)
|
131
|
+
other_workers = other.to_set
|
132
|
+
|
133
|
+
self.class.new((@classes + other_workers).uniq)
|
134
|
+
end
|
135
|
+
|
136
|
+
#
|
137
|
+
# Adds the worker class to the workers.
|
138
|
+
#
|
139
|
+
# @param [Class<Worker>] worker
|
140
|
+
# The worker class to add.
|
141
|
+
#
|
142
|
+
# @return [self]
|
143
|
+
#
|
144
|
+
def <<(worker)
|
145
|
+
@classes << worker
|
146
|
+
return self
|
147
|
+
end
|
148
|
+
|
149
|
+
#
|
150
|
+
# Loads a worker and adds it to the workers.
|
151
|
+
#
|
152
|
+
# @param [String] worker_id
|
153
|
+
# The worker ID to load.
|
154
|
+
#
|
155
|
+
# @return [self]
|
156
|
+
#
|
157
|
+
def load(worker_id)
|
158
|
+
self << Recon.load_class(worker_id)
|
159
|
+
end
|
160
|
+
|
161
|
+
#
|
162
|
+
# Loads a worker from a file and adds it to the workers.
|
163
|
+
#
|
164
|
+
# @param [String] path
|
165
|
+
# The path to the file.
|
166
|
+
#
|
167
|
+
# @return [self]
|
168
|
+
#
|
169
|
+
def load_file(path)
|
170
|
+
self << Recon.load_class_from_file(path)
|
171
|
+
end
|
172
|
+
|
173
|
+
#
|
174
|
+
# Removes a worker class from the workers.
|
175
|
+
#
|
176
|
+
# @param [Class<Worker>] worker
|
177
|
+
# The worker class to remove.
|
178
|
+
#
|
179
|
+
# @return [self, nil]
|
180
|
+
# If the worker class was in the workers, than `self` is returned.
|
181
|
+
# If the worker class was not in the workers, then `nil` will be
|
182
|
+
# returned.
|
183
|
+
#
|
184
|
+
def delete(worker)
|
185
|
+
if @classes.delete?(worker)
|
186
|
+
self
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
#
|
191
|
+
# Removes a worker with the ID from the workers.
|
192
|
+
#
|
193
|
+
# @param [String] worker_id
|
194
|
+
# The worker ID to remove.
|
195
|
+
#
|
196
|
+
# @return [self, nil]
|
197
|
+
# If the worker ID was in the workers, than `self` is returned.
|
198
|
+
# If the worker ID was not in the workers, then `nil` will be
|
199
|
+
# returned.
|
200
|
+
#
|
201
|
+
def remove(worker_id)
|
202
|
+
if @classes.reject! { |worker| worker.id == worker_id }
|
203
|
+
self
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
# Intensity levels sorted by their intensity.
|
208
|
+
#
|
209
|
+
# @api private
|
210
|
+
INTENSITY_LEVELS = [
|
211
|
+
:passive,
|
212
|
+
:active,
|
213
|
+
:aggressive
|
214
|
+
]
|
215
|
+
|
216
|
+
#
|
217
|
+
# Filters the workers by their {Worker.intensity intensity} level.
|
218
|
+
#
|
219
|
+
# @param [:passive, :active, :aggressive] level
|
220
|
+
# The maximum intensity level to filter by.
|
221
|
+
#
|
222
|
+
# @return [Workers]
|
223
|
+
#
|
224
|
+
def intensity(level)
|
225
|
+
level_index = INTENSITY_LEVELS.index(level)
|
226
|
+
|
227
|
+
self.class.new(
|
228
|
+
@classes.select { |worker|
|
229
|
+
if (intensity_index = INTENSITY_LEVELS.index(worker.intensity))
|
230
|
+
intensity_index <= level_index
|
231
|
+
end
|
232
|
+
}
|
233
|
+
)
|
234
|
+
end
|
235
|
+
|
236
|
+
#
|
237
|
+
# Determines if the workers is equal to another workers.
|
238
|
+
#
|
239
|
+
# @param [Object] other
|
240
|
+
# The other workers.
|
241
|
+
#
|
242
|
+
# @return [Boolean]
|
243
|
+
#
|
244
|
+
def ==(other)
|
245
|
+
self.class == other.class &&
|
246
|
+
@classes == other.classes
|
247
|
+
end
|
248
|
+
|
249
|
+
#
|
250
|
+
# Converts the workers into a Set.
|
251
|
+
#
|
252
|
+
# @return [Set<Class<Worker>>]
|
253
|
+
#
|
254
|
+
def to_set
|
255
|
+
@classes
|
256
|
+
end
|
257
|
+
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
data/lib/ronin/recon.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
3
|
+
# ronin-recon - A micro-framework and tool for performing reconnaissance.
|
4
|
+
#
|
5
|
+
# Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
|
6
|
+
#
|
7
|
+
# ronin-recon is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published
|
9
|
+
# by the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# ronin-recon is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU Lesser General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
18
|
+
# along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
|
19
|
+
#
|
20
|
+
|
21
|
+
require 'ronin/recon/engine'
|
22
|
+
require 'ronin/recon/version'
|
@@ -0,0 +1,76 @@
|
|
1
|
+
.\" Generated by kramdown-man 1.0.1
|
2
|
+
.\" https://github.com/postmodern/kramdown-man#readme
|
3
|
+
.TH ronin-recon-completion 1 "2024-01-01" Ronin Recon "User Manuals"
|
4
|
+
.SH NAME
|
5
|
+
.PP
|
6
|
+
ronin\-recon\-completion \- Manages shell completion rules for \fBronin\-recon\fR
|
7
|
+
.SH SYNOPSIS
|
8
|
+
.PP
|
9
|
+
\fBronin\-recon completion\fR \[lB]\fIoptions\fP\[rB]
|
10
|
+
.SH DESCRIPTION
|
11
|
+
.PP
|
12
|
+
The \fBronin\-recon completion\fR command can print, install, or uninstall shell
|
13
|
+
completion rules for the \fBronin\-recon\fR command\.
|
14
|
+
.PP
|
15
|
+
Supports installing completion rules for Bash or Zsh shells\.
|
16
|
+
Completion rules for the Fish shell is currently not supported\.
|
17
|
+
.SS ZSH SUPPORT
|
18
|
+
.PP
|
19
|
+
Zsh users will have to add the following lines to their \fB\[ti]\[sl]\.zshrc\fR file in
|
20
|
+
order to enable Zsh\[cq]s Bash completion compatibility layer:
|
21
|
+
.PP
|
22
|
+
.RS 4
|
23
|
+
.EX
|
24
|
+
autoload \-Uz \[pl]X compinit && compinit
|
25
|
+
autoload \-Uz \[pl]X bashcompinit && bashcompinit
|
26
|
+
.EE
|
27
|
+
.RE
|
28
|
+
.SH OPTIONS
|
29
|
+
.TP
|
30
|
+
\fB\-\-print\fR
|
31
|
+
Prints the shell completion file\.
|
32
|
+
.TP
|
33
|
+
\fB\-\-install\fR
|
34
|
+
Installs the shell completion file\.
|
35
|
+
.TP
|
36
|
+
\fB\-\-uninstall\fR
|
37
|
+
Uninstalls the shell completion file\.
|
38
|
+
.TP
|
39
|
+
\fB\-h\fR, \fB\-\-help\fR
|
40
|
+
Prints help information\.
|
41
|
+
.SH ENVIRONMENT
|
42
|
+
.TP
|
43
|
+
\fIPREFIX\fP
|
44
|
+
Specifies the root prefix for the file system\.
|
45
|
+
.TP
|
46
|
+
\fIHOME\fP
|
47
|
+
Specifies the home directory of the user\. Ronin will search for the
|
48
|
+
\fB\[ti]\[sl]\.cache\[sl]ronin\-recon\fR cache directory within the home directory\.
|
49
|
+
.TP
|
50
|
+
\fIXDG\[ru]DATA\[ru]HOME\fP
|
51
|
+
Specifies the data directory to use\. Defaults to \fB\[Do]HOME\[sl]\.local\[sl]share\fR\.
|
52
|
+
.SH FILES
|
53
|
+
.TP
|
54
|
+
\fB\[ti]\[sl]\.local\[sl]share\[sl]bash\-completion\[sl]completions\[sl]\fR
|
55
|
+
The user\-local installation directory for Bash completion files\.
|
56
|
+
.TP
|
57
|
+
\fB\[sl]usr\[sl]local\[sl]share\[sl]bash\-completion\[sl]completions\[sl]\fR
|
58
|
+
The system\-wide installation directory for Bash completions files\.
|
59
|
+
.TP
|
60
|
+
\fB\[sl]usr\[sl]local\[sl]share\[sl]zsh\[sl]site\-functions\[sl]\fR
|
61
|
+
The installation directory for Zsh completion files\.
|
62
|
+
.SH EXAMPLES
|
63
|
+
.TP
|
64
|
+
\fBronin\-recon completion \-\-print\fR
|
65
|
+
Prints the shell completion rules instead of installing them\.
|
66
|
+
.TP
|
67
|
+
\fBronin\-recon completion \-\-install\fR
|
68
|
+
Installs the shell completion rules for \fBronin\-recon\fR\.
|
69
|
+
.TP
|
70
|
+
\fBronin\-recon completion \-\-uninstall\fR
|
71
|
+
Uninstalls the shell completion rules for \fBronin\-recon\fR\.
|
72
|
+
.SH AUTHOR
|
73
|
+
.PP
|
74
|
+
Postmodern
|
75
|
+
.MT postmodern\.mod3\[at]gmail\.com
|
76
|
+
.ME
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# ronin-recon-completion 1 "2024-01-01" Ronin Recon "User Manuals"
|
2
|
+
|
3
|
+
## NAME
|
4
|
+
|
5
|
+
ronin-recon-completion - Manages shell completion rules for `ronin-recon`
|
6
|
+
|
7
|
+
## SYNOPSIS
|
8
|
+
|
9
|
+
`ronin-recon completion` [*options*]
|
10
|
+
|
11
|
+
## DESCRIPTION
|
12
|
+
|
13
|
+
The `ronin-recon completion` command can print, install, or uninstall shell
|
14
|
+
completion rules for the `ronin-recon` command.
|
15
|
+
|
16
|
+
Supports installing completion rules for Bash or Zsh shells.
|
17
|
+
Completion rules for the Fish shell is currently not supported.
|
18
|
+
|
19
|
+
### ZSH SUPPORT
|
20
|
+
|
21
|
+
Zsh users will have to add the following lines to their `~/.zshrc` file in
|
22
|
+
order to enable Zsh's Bash completion compatibility layer:
|
23
|
+
|
24
|
+
autoload -Uz +X compinit && compinit
|
25
|
+
autoload -Uz +X bashcompinit && bashcompinit
|
26
|
+
|
27
|
+
## OPTIONS
|
28
|
+
|
29
|
+
`--print`
|
30
|
+
: Prints the shell completion file.
|
31
|
+
|
32
|
+
`--install`
|
33
|
+
: Installs the shell completion file.
|
34
|
+
|
35
|
+
`--uninstall`
|
36
|
+
: Uninstalls the shell completion file.
|
37
|
+
|
38
|
+
`-h`, `--help`
|
39
|
+
: Prints help information.
|
40
|
+
|
41
|
+
## ENVIRONMENT
|
42
|
+
|
43
|
+
*PREFIX*
|
44
|
+
: Specifies the root prefix for the file system.
|
45
|
+
|
46
|
+
*HOME*
|
47
|
+
: Specifies the home directory of the user. Ronin will search for the
|
48
|
+
`~/.cache/ronin-recon` cache directory within the home directory.
|
49
|
+
|
50
|
+
*XDG_DATA_HOME*
|
51
|
+
: Specifies the data directory to use. Defaults to `$HOME/.local/share`.
|
52
|
+
|
53
|
+
## FILES
|
54
|
+
|
55
|
+
`~/.local/share/bash-completion/completions/`
|
56
|
+
: The user-local installation directory for Bash completion files.
|
57
|
+
|
58
|
+
`/usr/local/share/bash-completion/completions/`
|
59
|
+
: The system-wide installation directory for Bash completions files.
|
60
|
+
|
61
|
+
`/usr/local/share/zsh/site-functions/`
|
62
|
+
: The installation directory for Zsh completion files.
|
63
|
+
|
64
|
+
## EXAMPLES
|
65
|
+
|
66
|
+
`ronin-recon completion --print`
|
67
|
+
: Prints the shell completion rules instead of installing them.
|
68
|
+
|
69
|
+
`ronin-recon completion --install`
|
70
|
+
: Installs the shell completion rules for `ronin-recon`.
|
71
|
+
|
72
|
+
`ronin-recon completion --uninstall`
|
73
|
+
: Uninstalls the shell completion rules for `ronin-recon`.
|
74
|
+
|
75
|
+
## AUTHOR
|
76
|
+
|
77
|
+
Postmodern <postmodern.mod3@gmail.com>
|
78
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.\" Generated by kramdown-man 1.0.1
|
2
|
+
.\" https://github.com/postmodern/kramdown-man#readme
|
3
|
+
.TH ronin-recon-irb 1 "2023-02-01" Ronin Recon "User Manuals"
|
4
|
+
.SH NAME
|
5
|
+
.PP
|
6
|
+
ronin\-recon\-irb \- Starts an interactive Ruby shell with ronin\-recon loaded
|
7
|
+
.SH SYNOPSIS
|
8
|
+
.PP
|
9
|
+
\fBronin\-recon irb\fR \[lB]\fIoptions\fP\[rB]
|
10
|
+
.SH DESCRIPTION
|
11
|
+
.PP
|
12
|
+
Starts an interactive Ruby shell with \fBronin\[sl]recon\fR loaded\.
|
13
|
+
.SH OPTIONS
|
14
|
+
.TP
|
15
|
+
\fB\-h\fR, \fB\-\-help\fR
|
16
|
+
Print help information
|
17
|
+
.SH AUTHOR
|
18
|
+
.PP
|
19
|
+
Postmodern
|
20
|
+
.MT postmodern\.mod3\[at]gmail\.com
|
21
|
+
.ME
|
22
|
+
.SH SEE ALSO
|
23
|
+
.PP
|
24
|
+
.BR ronin\-recon\-workers (1)
|
25
|
+
.BR ronin\-recon\-worker (1)
|
26
|
+
.BR ronin\-recon\-run (1)
|
27
|
+
.BR ronin\-recon\-test (1)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# ronin-recon-irb 1 "2023-02-01" Ronin Recon "User Manuals"
|
2
|
+
|
3
|
+
## NAME
|
4
|
+
|
5
|
+
ronin-recon-irb - Starts an interactive Ruby shell with ronin-recon loaded
|
6
|
+
|
7
|
+
## SYNOPSIS
|
8
|
+
|
9
|
+
`ronin-recon irb` [*options*]
|
10
|
+
|
11
|
+
## DESCRIPTION
|
12
|
+
|
13
|
+
Starts an interactive Ruby shell with `ronin/recon` loaded.
|
14
|
+
|
15
|
+
## OPTIONS
|
16
|
+
|
17
|
+
`-h`, `--help`
|
18
|
+
: Print help information
|
19
|
+
|
20
|
+
## AUTHOR
|
21
|
+
|
22
|
+
Postmodern <postmodern.mod3@gmail.com>
|
23
|
+
|
24
|
+
## SEE ALSO
|
25
|
+
|
26
|
+
[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)
|