From 474a03475f49a612575bc1e0df7f5061e10f6c6c Mon Sep 17 00:00:00 2001 From: corelanc0d3r Date: Mon, 2 Dec 2013 11:57:52 +0100 Subject: [PATCH] sorted out the sorts without .sort --- lib/msf/base/simple/buffer.rb | 39 +++++++++++++++++++++-------------- lib/msf/util/exe.rb | 23 ++++++++++++++++++--- msfvenom | 4 ++-- 3 files changed, 45 insertions(+), 21 deletions(-) diff --git a/lib/msf/base/simple/buffer.rb b/lib/msf/base/simple/buffer.rb index eae124d5aa..a20ea9e0c0 100644 --- a/lib/msf/base/simple/buffer.rb +++ b/lib/msf/base/simple/buffer.rb @@ -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 diff --git a/lib/msf/util/exe.rb b/lib/msf/util/exe.rb index 091a40e2eb..776cedcb74 100644 --- a/lib/msf/util/exe.rb +++ b/lib/msf/util/exe.rb @@ -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 # diff --git a/msfvenom b/msfvenom index 4d258fda18..1fe9e13c18 100755 --- a/msfvenom +++ b/msfvenom @@ -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