File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
lib/msf/core/payload/python Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,15 @@ def stage_meterpreter(opts={})
98
98
# The callback URL can be different to the one that we're receiving from the interface
99
99
# so we need to generate it
100
100
# TODO: move this to somewhere more common so that it can be used across payload types
101
+ uri = "/#{ ( opts [ :uri ] . to_s == '' ? opts [ :url ] : opts [ :uri ] . to_s ) . split ( '/' ) . reject ( &:empty? ) [ -1 ] } "
101
102
callback_url = [
102
103
opts [ :url ] . split ( ':' ) [ 0 ] ,
103
104
'://' ,
104
105
( ds [ 'OverrideRequestHost' ] == true ? ds [ 'OverrideRequestLHOST' ] : ds [ 'LHOST' ] ) . to_s ,
105
106
':' ,
106
107
( ds [ 'OverrideRequestHost' ] == true ? ds [ 'OverrideRequestLPORT' ] : ds [ 'LPORT' ] ) . to_s ,
107
108
ds [ 'LURI' ] . to_s ,
108
- opts [ : uri] . to_s ,
109
+ uri ,
109
110
'/'
110
111
] . join ( '' )
111
112
You can’t perform that action at this time.
0 commit comments