File tree 3 files changed +23
-0
lines changed
lib/ronin/recon/cli/commands
3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ module Commands
56
56
# -I, --ignore VALUE The values to ignore in result
57
57
# -F txt|list|csv|json|ndjson|dot|svg|png|pdf,
58
58
# --output-format The output format
59
+ # --output-dir DIR Writes data to an output directory
59
60
# --import Imports each newly discovered value into the Ronin database
60
61
# -h, --help Print help information
61
62
#
@@ -153,6 +154,14 @@ class Run < Command
153
154
} ,
154
155
desc : 'The output format'
155
156
157
+ option :output_dir , value : {
158
+ type : String ,
159
+ usage : 'DIR'
160
+ } ,
161
+ desc : 'Writes data to an output directory' do |path |
162
+ @outputs << [ path , OutputFormats ::Dir ]
163
+ end
164
+
156
165
option :import , desc : 'Imports each newly discovered value into the Ronin database'
157
166
158
167
option :ignore , short : '-I' ,
Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ Runs the recon engine with one or more initial values.
70
70
: The output format. If not specified, the output format will be inferred from
71
71
the ` --output ` * FILE* extension.
72
72
73
+ ` --output-dir ` * DIR*
74
+ : Writes the output to a directory of separate files for each value type.
75
+
73
76
` --import `
74
77
: Imports each newly discovered value into the Ronin database.
75
78
Original file line number Diff line number Diff line change 162
162
end
163
163
end
164
164
165
+ context "when the '--output-dir' option is given" do
166
+ let ( :path ) { 'path/to/dir' }
167
+ let ( :argv ) { [ '--output-dir' , path ] }
168
+
169
+ it "must add the output directory path to #outputs" do
170
+ expect ( subject . outputs ) . to eq ( [
171
+ [ path , Ronin ::Recon ::OutputFormats ::Dir ]
172
+ ] )
173
+ end
174
+ end
175
+
165
176
context "when the '--ignore' option is given" do
166
177
let ( :value1 ) { Ronin ::Recon ::Values ::Host . new ( 'staging.example.com' ) }
167
178
let ( :value2 ) { Ronin ::Recon ::Values ::Host . new ( 'dev.example.com' ) }
You can’t perform that action at this time.
0 commit comments