Fix improper use of the Ruby shovel operator (<<)

junk would be modified and returned, and we just want to return the
concatenated string. Practically doesn't matter, but it's incorrect.

This was my first public module. I've been wanting to fix this since.
I'm noticing it again now as I look for how I used Ret in a target.
GSoC/Meterpreter_Web_Console
William Vu 2018-10-05 02:10:42 -05:00
parent dbfe67573d
commit d9cb052189
1 changed files with 1 additions and 1 deletions

View File

@ -70,6 +70,6 @@ class MetasploitModule < Msf::Exploit
jump = Rex::Arch::X86.jmp_short(66)
padding = rand_text(66) # Pad past buffer corruption
junk << seh << jump << padding << payload.encoded
junk + seh + jump + padding + payload.encoded
end
end