allow reusing the already-generated payload uuid in generate_uri_uuid_mode
parent
a580055491
commit
e74239b30f
|
@ -26,6 +26,7 @@ module Payload::Android::ReverseHttp
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
opts[:uri] ||= luri + generate_uri(opts)
|
||||
super(opts)
|
||||
end
|
||||
|
@ -46,7 +47,7 @@ module Payload::Android::ReverseHttp
|
|||
raise ArgumentError, "Minimum StagerURILength is 5"
|
||||
end
|
||||
|
||||
generate_uri_uuid_mode(:init_java, uri_req_len)
|
||||
generate_uri_uuid_mode(:init_java, uri_req_len, uuid: opts[:uuid])
|
||||
end
|
||||
|
||||
#
|
||||
|
|
|
@ -30,7 +30,7 @@ module Msf::Payload::UUID::Options
|
|||
# @param len [Fixnum] The length of the URI not including the leading slash, optionally nil for random
|
||||
# @return [String] A URI with a leading slash that hashes to the checksum, with an optional UUID
|
||||
#
|
||||
def generate_uri_uuid_mode(mode,len=nil)
|
||||
def generate_uri_uuid_mode(mode, len = nil, uuid: nil)
|
||||
sum = uri_checksum_lookup(mode)
|
||||
|
||||
# The URI length may not have room for an embedded UUID
|
||||
|
@ -42,7 +42,7 @@ module Msf::Payload::UUID::Options
|
|||
return "/" + generate_uri_checksum(sum, len, prefix="")
|
||||
end
|
||||
|
||||
uuid = generate_payload_uuid
|
||||
uuid ||= generate_payload_uuid
|
||||
uri = generate_uri_uuid(sum, uuid, len)
|
||||
record_payload_uuid_url(uuid, uri)
|
||||
|
||||
|
|
Loading…
Reference in New Issue