Land #10531, fix NOP generator for sparc

GSoC/Meterpreter_Web_Console
Brent Cook 2018-08-27 11:39:17 -05:00
commit a5c22cf794
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 8 additions and 4 deletions

View File

@ -196,11 +196,15 @@ class MetasploitModule < Msf::Nop
return '' if len == 0 return '' if len == 0
len = 0x3fffff if (len >= 0x400000) len = 0x3fffff if (len >= 0x400000)
a = rand(2).floor
b = ref[0]
c = rand(len - 1).floor
return [ return [
(rand(2) << 29) | (a << 29) |
(ref[0] << 25) | (b << 25) |
(2 << 22) | (2 << 22) |
rand(len - 1) + 1 c + 1
].pack('N') ].pack('N')
end end
end end