bool params are truthy, don't cast to a string

This commit is contained in:
Brent Cook
2018-08-20 15:53:49 -05:00
parent 7c3810bbff
commit e8af2dd67c
+1 -1
View File
@@ -35,7 +35,7 @@ class MetasploitModule < Msf::Nop
badchars = opts['BadChars'] || ''
random = opts['Random'] || datastore['RandomNops']
if( random and random.to_s.match(/^(t|y|1)/i) )
if random
1.upto(1024) do |i|
regs_d = (rand(0x8000 - 0x0800) + 0x0800).to_i
regs_b = [regs_d].pack('n').unpack('B*')[0][1, 15]