Use rex support for build_call
parent
0968f14ac1
commit
d6048d0978
|
@ -52,22 +52,19 @@ module Msf
|
||||||
hash = opts[:hash] || 0
|
hash = opts[:hash] || 0
|
||||||
arguments = opts[:arguments] || []
|
arguments = opts[:arguments] || []
|
||||||
|
|
||||||
block_data = Rex::Java::Serialization::Model::BlockData.new
|
uid = Rex::Proto::Rmi::Model::UniqueIdentifier.new(
|
||||||
block_data.contents = [
|
number: uid_number,
|
||||||
object_number,
|
time: uid_time,
|
||||||
uid_number,
|
count: uid_count
|
||||||
uid_time,
|
)
|
||||||
uid_count,
|
|
||||||
operation,
|
|
||||||
hash
|
|
||||||
].pack('q>l>q>s>l>q>')
|
|
||||||
block_data.length = block_data.contents.length
|
|
||||||
|
|
||||||
call_data = Rex::Java::Serialization::Model::Stream.new
|
call_data = Rex::Proto::Rmi::Model::CallData.new(
|
||||||
call_data.contents << block_data
|
object_number: object_number,
|
||||||
arguments.each do |arg|
|
uid: uid,
|
||||||
call_data.contents << arg
|
operation: operation,
|
||||||
end
|
hash: hash,
|
||||||
|
arguments: arguments
|
||||||
|
)
|
||||||
|
|
||||||
call = Rex::Proto::Rmi::Model::Call.new(
|
call = Rex::Proto::Rmi::Model::Call.new(
|
||||||
message_id: message_id,
|
message_id: message_id,
|
||||||
|
|
Loading…
Reference in New Issue