Handle better java references

bug/bundler_fix
jvazquez-r7 2015-01-07 15:19:28 -06:00
parent ba13e9d64c
commit 731c2f99d1
2 changed files with 11 additions and 1 deletions

View File

@ -109,6 +109,11 @@ module Rex
desc = array_description.description
if desc.class == Reference
ref = desc.handle - BASE_WIRE_HANDLE
desc = stream.references[ref]
end
unless desc.class_name.contents[0] == '[' # Array
raise ::RuntimeError, 'Unsupported NewArray description'
end

View File

@ -94,7 +94,12 @@ module Rex
values = []
unless my_class_desc.super_class.description.class == NullReference
values += decode_class_data(io, my_class_desc.super_class.description)
if my_class_desc.super_class.description.class == Reference
ref = my_class_desc.super_class.description.handle - BASE_WIRE_HANDLE
values += decode_class_data(io, stream.references[ref])
else
values += decode_class_data(io, my_class_desc.super_class.description)
end
end
values += decode_class_fields(io, my_class_desc)