diff --git a/modules/exploits/windows/fileformat/vlc_mkv.rb b/modules/exploits/windows/fileformat/vlc_mkv.rb index 44faddd526..0ad0adf056 100644 --- a/modules/exploits/windows/fileformat/vlc_mkv.rb +++ b/modules/exploits/windows/fileformat/vlc_mkv.rb @@ -115,8 +115,7 @@ class MetasploitModule < Msf::Exploit::Remote h = format('%x', num: num) s = ('0' * (h.length % 2) + h).rjust(length * 2) s = s.scan(/.{2}/).map! { |x| x.hex.chr }.join - return s if endianess == 'big' - return s.reverse + endianess == 'big' ? s : s.reverse end def data_size(number, numbytes = (1...9)) @@ -126,7 +125,7 @@ class MetasploitModule < Msf::Exploit::Remote bits = size * 7 return to_bytes(((1 << bits) + number), size) if number <= (1 << bits) - 2 end - raise ArgumentError, "Can't store #{number} in #{size} bytes" + fail_with(Failure::BadConfig, "Can't store #{number} in #{size} bytes") end def build_data(size)