Tab completion for exploit and handler commands

MS-2855/keylogger-mettle-extension
Spencer McIntyre 2017-11-11 17:11:54 -05:00
parent 68a43fef36
commit fb7635502d
4 changed files with 39 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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