Fix for an Issue #329

This commit is contained in:
Miroslav Stampar 2013-01-02 22:17:06 +01:00
parent 304e52cb4d
commit cb15fcc8af

View File

@ -513,13 +513,10 @@ class Metasploit:
pollProcess(process)
payloadStderr = process.communicate()[1]
if Backend.isOs(OS.WINDOWS) or extra == "BufferRegister=EAX":
payloadSize = re.search("size ([\d]+)", payloadStderr, re.I)
else:
payloadSize = re.search("Length\:\s([\d]+)", payloadStderr, re.I)
match = re.search("(Total size:|Length:|succeeded with size) ([\d]+)", payloadStderr)
if payloadSize:
payloadSize = int(payloadSize.group(1))
if match:
payloadSize = int(match.group(2))
if extra == "BufferRegister=EAX":
payloadSize = payloadSize / 2