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
len = 0x3fffff if (len >= 0x400000)
a = rand(2).floor
b = ref[0]
c = rand(len - 1).floor
return [
(rand(2) << 29) |
(ref[0] << 25) |
(2 << 22) |
rand(len - 1) + 1
(a << 29) |
(b << 25) |
(2 << 22) |
c + 1
].pack('N')
end
end