File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def listener_uri
91
91
def payload_uri ( req )
92
92
if req and req . headers and req . headers [ 'Host' ] and not datastore [ 'OverrideRequestHost' ]
93
93
callback_host = req . headers [ 'Host' ]
94
- elsif ipv6?
94
+ elsif Rex :: Socket . is_ipv6? ( datastore [ 'LHOST' ] )
95
95
callback_host = "[#{ datastore [ 'LHOST' ] } ]:#{ datastore [ 'LPORT' ] } "
96
96
else
97
97
callback_host = "#{ datastore [ 'LHOST' ] } :#{ datastore [ 'LPORT' ] } "
Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ def generate_stageless(opts={})
35
35
raise ArgumentError , "Stageless generation requires an ssl argument"
36
36
end
37
37
38
- url = "http#{ opts [ :ssl ] ? "s" : "" } ://#{ datastore [ 'LHOST' ] } :#{ datastore [ 'LPORT' ] } "
38
+ host = datastore [ 'LHOST' ]
39
+ host = "[#{ host } ]" if Rex ::Socket . is_ipv6? ( host )
40
+ url = "http#{ opts [ :ssl ] ? "s" : "" } ://#{ host } :#{ datastore [ 'LPORT' ] } "
39
41
url << "#{ generate_uri_uuid_mode ( :connect ) } /"
40
42
41
43
# invoke the given function to generate the architecture specific payload
You can’t perform that action at this time.
0 commit comments