Land #10531, fix NOP generator for sparc

4.x
Brent Cook 2018-08-27 11:39:17 -05:00 committed by Metasploit
parent f22e6ec2bf
commit 6f42bcafcf
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
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