add alias for calling Msf::Exploit regenerate_payload explicitly -- fixes #2312

git-svn-id: file:///home/svn/framework3/trunk@9950 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Joshua Drake 2010-08-03 15:14:34 +00:00
parent 8ccc8a290e
commit 2f384cde82
4 changed files with 15 additions and 3 deletions

View File

@ -1191,6 +1191,18 @@ class Exploit < Msf::Module
self.session_count = 0
end
##
#
# Aliases
#
# These allow access to methods inside this class, even if exploits use mixins that
# override them.
#
##
alias :exploit_regenerate_payload :regenerate_payload
##
#
# Attributes

View File

@ -95,7 +95,7 @@ class Metasploit3 < Msf::Exploit::Remote
# Payload generation already happened, therefore SHELL will
# already be 'automatic' in the payload regardless of what we set above.
# To fix this, we regenerate the payload now..
return if ((p = regenerate_payload(platform, target_arch)) == nil)
return if ((p = exploit_regenerate_payload(platform, target_arch)) == nil)
end
# The following Beanshell script will write the exploded WAR file to the deploy/

View File

@ -80,7 +80,7 @@ class Metasploit3 < Msf::Exploit::Remote
print_status("SHELL set to #{datastore['SHELL']}")
return if ((p = regenerate_payload(plat, target_arch)) == nil)
return if ((p = exploit_regenerate_payload(plat, target_arch)) == nil)
end

View File

@ -162,7 +162,7 @@ class Metasploit3 < Msf::Exploit::Remote
end
# We must regenerate the payload in case our auto-magic changed something.
return if ((p = regenerate_payload(plat, arch)) == nil)
return if ((p = exploit_regenerate_payload(plat, arch)) == nil)
# Generate the WAR containing the payload
if (mytarget.name =~ /Java/)