diff --git a/lib/ronin/exploits/cli/commands/run.rb b/lib/ronin/exploits/cli/commands/run.rb index 4f592c13..1267f1c4 100644 --- a/lib/ronin/exploits/cli/commands/run.rb +++ b/lib/ronin/exploits/cli/commands/run.rb @@ -69,7 +69,8 @@ module Commands # --target-os Selects the target with the matching OS # --target-os-version VERSION Selects the target with the matching OS version # -S, --target-software NAME Selects the target with the matching software name - # -V, --target-version VERSION Selects the target with the matching software version + # -V VERSION, Selects the target with the matching software version + # --target-software-version # -L, --save-loot DIR Saves any found loot to the DIR # -d, --debug Enables debugging messages # --irb Open an interactive Ruby shell inside the exploit @@ -200,14 +201,14 @@ class Run < ExploitCommand @target_kwargs[:software] = software end - option :target_version, short: '-V', - value: { - type: String, - usage: 'VERSION' - }, - desc: 'Selects the target with the matching software version' do |version| - @target_kwargs[:version] = version - end + option :target_software_version, short: '-V', + value: { + type: String, + usage: 'VERSION' + }, + desc: 'Selects the target with the matching software version' do |version| + @target_kwargs[:software_version] = version + end option :save_loot, short: '-L', value: { diff --git a/man/ronin-exploits-run.1.md b/man/ronin-exploits-run.1.md index 96eabeaa..ed3f5e07 100644 --- a/man/ronin-exploits-run.1.md +++ b/man/ronin-exploits-run.1.md @@ -70,7 +70,7 @@ Loads and runs an exploit. `-S`, `--target-software` *NAME* : Selects the target with the matching software name. -`-V`, `--target-version` *VERSION* +`-V`, `--target-software-version` *VERSION* : Selects the target with the matching software version. `-L`, `--save-loot` *DIR* diff --git a/spec/cli/commands/run_spec.rb b/spec/cli/commands/run_spec.rb index 410b4eb6..fd8f6d89 100644 --- a/spec/cli/commands/run_spec.rb +++ b/spec/cli/commands/run_spec.rb @@ -194,11 +194,11 @@ context "when parsing '--target-software-version VERSION'" do let(:software_version) { '1.2.3' } - let(:argv) { ['--target-version', software_version] } + let(:argv) { ['--target-software-version', software_version] } before { subject.option_parser.parse(argv) } it "must set :version in the #target_kwargs Hash to the given software version" do - expect(subject.target_kwargs[:version]).to eq(software_version) + expect(subject.target_kwargs[:software_version]).to eq(software_version) end end end