Skip to content

Commit b3e3821

Browse files
author
Brent Cook
committed
Land rapid7#8084, Add rcheck/recheck commands to aux modules and exploits
2 parents 8258680 + febe962 commit b3e3821

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

lib/msf/ui/console/command_dispatcher/auxiliary.rb

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ class Auxiliary
2727
#
2828
def commands
2929
super.update({
30-
"run" => "Launches the auxiliary module",
31-
"rerun" => "Reloads and launches the auxiliary module",
32-
"exploit" => "This is an alias for the run command",
30+
"run" => "Launches the auxiliary module",
31+
"rcheck" => "Reloads the module and checks if the target is vulnerable",
32+
"rerun" => "Reloads and launches the auxiliary module",
33+
"exploit" => "This is an alias for the run command",
34+
"recheck" => "This is an alias for the rcheck command",
3335
"rexploit" => "This is an alias for the rerun command",
3436
"reload" => "Reloads the auxiliary module"
3537
}).merge( (mod ? mod.auxiliary_commands : {}) )
@@ -147,6 +149,18 @@ def cmd_run_help
147149

148150
alias cmd_exploit_help cmd_run_help
149151

152+
#
153+
# Reloads an auxiliary module and checks the target to see if it's
154+
# vulnerable.
155+
#
156+
def cmd_rcheck(*args)
157+
reload()
158+
159+
cmd_check(*args)
160+
end
161+
162+
alias cmd_recheck cmd_rcheck
163+
150164
end
151165

152166
end end end end

lib/msf/ui/console/command_dispatcher/exploit.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ def commands
3232
"exploit" => "Launch an exploit attempt",
3333
"rcheck" => "Reloads the module and checks if the target is vulnerable",
3434
"rexploit" => "Reloads the module and launches an exploit attempt",
35-
"reload" => "Just reloads the module",
3635
"run" => "Alias for exploit",
36+
"recheck" => "Alias for rcheck",
3737
"rerun" => "Alias for rexploit",
38+
"reload" => "Just reloads the module"
3839
})
3940
end
4041

@@ -186,6 +187,8 @@ def cmd_rcheck(*args)
186187
cmd_check(*args)
187188
end
188189

190+
alias cmd_recheck cmd_rcheck
191+
189192
#
190193
# Reloads an exploit module and launches an exploit.
191194
#

0 commit comments

Comments
 (0)