sorted out the sorts without .sort

bug/bundler_fix
corelanc0d3r 2013-12-02 11:57:52 +01:00
parent 66edfe968d
commit 474a03475f
3 changed files with 45 additions and 21 deletions

View File

@ -90,22 +90,29 @@ module Buffer
# Returns the list of supported formats
#
def self.transform_formats
['raw',
'num',
'dword','dw',
'ruby','rb',
'perl','pl',
'bash','sh',
'c',
'csharp',
'js_be',
'js_le',
'java',
'python','py',
'powershell','ps1',
'vbscript',
'vbapplication'
].sort
[
'bash',
'c',
'csharp',
'dw',
'dword',
'java',
'js_be',
'js_le',
'num',
'perl',
'pl',
'powershell',
'ps1',
'py',
'python',
'raw',
'rb',
'ruby',
'sh',
'vbapplication',
'vbscript'
]
end
end

View File

@ -1729,9 +1729,26 @@ def self.to_vba(framework,code,opts={})
def self.to_executable_fmt_formats
[
'dll','exe','exe-service','exe-small','exe-only','elf','macho','vba','vba-exe',
'vbs','loop-vbs','asp','aspx', 'aspx-exe','war','psh','psh-net', 'msi', 'msi-nouac'
].sort
"asp",
"aspx",
"aspx-exe",
"dll",
"elf",
"exe",
"exe-only",
"exe-service",
"exe-small",
"loop-vbs",
"macho",
"msi",
"msi-nouac",
"psh",
"psh-net",
"vba",
"vba-exe",
"vbs",
"war"
]
end
#

View File

@ -147,9 +147,9 @@ class MsfVenom
opt.on_tail('--help-formats', String, "List available formats") do
init_framework(:module_types => [])
msg = "Executable formats\n" +
"\t" + ::Msf::Util::EXE.to_executable_fmt_formats.sort.join(", ") + "\n" +
"\t" + ::Msf::Util::EXE.to_executable_fmt_formats.join(", ") + "\n" +
"Transform formats\n" +
"\t" + ::Msf::Simple::Buffer.transform_formats.sort.join(", ")
"\t" + ::Msf::Simple::Buffer.transform_formats.join(", ")
raise UsageError, msg
end