mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-05 14:57:30 +01:00
Fixes #328. Crafty little bug -- if asm was "" vs nil, the stage would try to compile as metasm instead of using the raw payload.
git-svn-id: file:///home/svn/framework3/trunk@7278 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
e7638ef887
commit
32f7d742b3
@ -487,10 +487,12 @@ protected
|
||||
# is used to localize the way the generated payload is cached (whether the
|
||||
# blob is part of a single, stager, or stage, for example).
|
||||
#
|
||||
def build(p, asm, off, suffix = '')
|
||||
def build(x, asm, off, suffix = '')
|
||||
# If there is no assembly to be compiled, then we return a duplicated
|
||||
# copy of the raw payload blob
|
||||
return p.dup if asm.nil?
|
||||
if(asm.nil? or asm.empty?)
|
||||
return x.dup
|
||||
end
|
||||
|
||||
cache_key = refname + suffix
|
||||
cache_entry = framework.payloads.check_blob_cache(cache_key)
|
||||
|
Loading…
Reference in New Issue
Block a user