Tab completion for exploit and handler commands
parent
68a43fef36
commit
fb7635502d
|
@ -164,6 +164,21 @@ class Exploit
|
|||
end
|
||||
end
|
||||
|
||||
def cmd_exploit_tabs(str, words)
|
||||
fmt = {
|
||||
'-e' => [ framework.encoders.map { |refname, mod| refname } ],
|
||||
'-f' => [ nil ],
|
||||
'-h' => [ nil ],
|
||||
'-j' => [ nil ],
|
||||
'-n' => [ framework.nops.map { |refname, mod| refname } ],
|
||||
'-o' => [ true ],
|
||||
'-p' => [ framework.payloads.map { |refname, mod| refname } ],
|
||||
'-t' => [ true ],
|
||||
'-z' => [ nil ]
|
||||
}
|
||||
tab_complete_generic(fmt, str, words)
|
||||
end
|
||||
|
||||
alias cmd_run cmd_exploit
|
||||
|
||||
def cmd_exploit_help
|
||||
|
|
|
@ -341,6 +341,19 @@ module Msf
|
|||
|
||||
print_status "Payload handler running as background job #{job_id}."
|
||||
end
|
||||
|
||||
def cmd_handler_tabs(str, words)
|
||||
fmt = {
|
||||
'-h' => [ nil ],
|
||||
'-x' => [ nil ],
|
||||
'-p' => [ framework.payloads.map { |refname, mod| refname } ],
|
||||
'-P' => [ true ],
|
||||
'-H' => [ :address ],
|
||||
'-e' => [ framework.encoders.map { |refname, mod| refname } ],
|
||||
'-n' => [ true ]
|
||||
}
|
||||
tab_complete_generic(fmt, str, words)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -155,17 +155,17 @@ module Msf
|
|||
def cmd_generate_tabs(str, words)
|
||||
fmt = {
|
||||
'-b' => [ true ],
|
||||
'-E' => [ nil, ],
|
||||
'-E' => [ nil ],
|
||||
'-e' => [ framework.encoders.map { |refname, mod| refname } ],
|
||||
'-h' => [ nil, ],
|
||||
'-o' => [ true, ],
|
||||
'-s' => [ true, ],
|
||||
'-f' => [ :file, ],
|
||||
'-t' => [ @@supported_formats, ],
|
||||
'-p' => [ true, ],
|
||||
'-k' => [ nil, ],
|
||||
'-x' => [ :file, ],
|
||||
'-i' => [ true, ]
|
||||
'-h' => [ nil ],
|
||||
'-o' => [ true ],
|
||||
'-s' => [ true ],
|
||||
'-f' => [ :file ],
|
||||
'-t' => [ @@supported_formats ],
|
||||
'-p' => [ true ],
|
||||
'-k' => [ nil ],
|
||||
'-x' => [ :file ],
|
||||
'-i' => [ true ]
|
||||
}
|
||||
tab_complete_generic(fmt, str, words)
|
||||
end
|
||||
|
|
|
@ -259,7 +259,7 @@ module DispatcherShell
|
|||
|
||||
tabs = []
|
||||
if arg.to_s.to_sym == :address
|
||||
tabs = tab_complete_source_addresses
|
||||
tabs = tab_complete_source_address
|
||||
elsif arg.to_s.to_sym == :bool
|
||||
tabs = ['true', 'false']
|
||||
elsif arg.to_s.to_sym == :file
|
||||
|
|
Loading…
Reference in New Issue