Skip to content

Commit 5e65976

Browse files
committed
Alias 'run' to 'exploit'
Allows console users to use the 'run' command for exploits as well as auxiliary and post, in the same way that 'exploit' works for all three. Saves some typing and makes it do the right thing so users don't have to remember what kind of module they're using.
1 parent 993a733 commit 5e65976

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ def commands
3333
"exploit" => "Launch an exploit attempt",
3434
"rcheck" => "Reloads the module and checks if the target is vulnerable",
3535
"rexploit" => "Reloads the module and launches an exploit attempt",
36-
"reload" => "Just reloads the module"
36+
"reload" => "Just reloads the module",
37+
"run" => "Alias for exploit",
38+
"rerun" => "Alias for rexploit",
3739
})
3840
end
3941

@@ -197,13 +199,17 @@ def cmd_exploit(*args)
197199
end
198200
end
199201

202+
alias cmd_run cmd_exploit
203+
200204
def cmd_exploit_help
201205
print_line "Usage: exploit [options]"
202206
print_line
203207
print_line "Launches an exploitation attempt."
204208
print @@exploit_opts.usage
205209
end
206210

211+
alias cmd_run_help cmd_exploit_help
212+
207213
#
208214
# Reloads an exploit module and checks the target to see if it's
209215
# vulnerable.
@@ -227,13 +233,17 @@ def cmd_rexploit(*args)
227233
end
228234
end
229235

236+
alias cmd_rerun cmd_rexploit
237+
230238
def cmd_rexploit_help
231239
print_line "Usage: rexploit [options]"
232240
print_line
233241
print_line "Reloads a module, stopping any associated job, and launches an exploitation attempt."
234242
print @@exploit_opts.usage
235243
end
236244

245+
alias cmd_rerun_help cmd_rexploit_help
246+
237247
#
238248
# Picks a reasonable payload and minimally configures it
239249
#

0 commit comments

Comments
 (0)