Skip to content
Browse files

Load the encoders/nops modules in msfpayload for encoding, load nops …

…in msfencode

git-svn-id: file:///home/svn/framework3/trunk@6694 4d416f70-5f16-0410-b530-b9f4589650da
  • Loading branch information...
1 parent 93cd190 commit a13c01ed3eda0034e9de3991d5d59335f614179f HD Moore committed Jun 21, 2009
Showing with 5 additions and 4 deletions.
  1. +3 −2 lib/msf/util/exe.rb
  2. +1 −1 msfencode
  3. +1 −1 msfpayload
View
5 lib/msf/util/exe.rb
@@ -90,8 +90,8 @@ def self.to_win32pe(framework, code)
return pe
end
-
- def self.to_win32pe_service(framework, code, name="SERVICENAME")
+
+ def self.to_win32pe_service(framework, code, name='SERVICENAME')
pe = ''
fd = File.open(File.join(File.dirname(__FILE__), "..", "..", "..", "data", "templates", "service.exe"), "rb")
@@ -305,6 +305,7 @@ def self.to_dotnetmem(base=0x12340000, data="")
def self.encode_stub(framework, arch, code)
+ return code if not framework.encoders
framework.encoders.each_module_ranked('Arch' => arch) do |name, mod|
begin
enc = framework.encoders.create(name)
View
2 msfencode
@@ -139,7 +139,7 @@ $args.parse(ARGV) { |opt, idx, val|
# Initialize the simplified framework instance.
$framework = Msf::Simple::Framework.create(
- :module_types => [ Msf::MODULE_ENCODER ]
+ :module_types => [ Msf::MODULE_ENCODER, Msf::MODULE_NOP ]
)
# Get the list of encoders to try
View
2 msfpayload
@@ -34,7 +34,7 @@ end
# Initialize the simplified framework instance.
$framework = Msf::Simple::Framework.create(
- :module_types => [ Msf::MODULE_PAYLOAD ]
+ :module_types => [ Msf::MODULE_PAYLOAD, Msf::MODULE_ENCODER, Msf::MODULE_NOP ]
)

0 comments on commit a13c01e

Please sign in to comment.
Something went wrong with that request. Please try again.