Add another condition to check if the payload name is a reverse shell
Only reverse shells need LHOSTbug/bundler_fix
parent
47ae4b470a
commit
17f8cf900a
|
@ -118,10 +118,11 @@ rest.each do |x|
|
|||
end
|
||||
|
||||
# if LHOST is not set auto set it
|
||||
if options['LHOST'].nil?
|
||||
if payload_name =~ /[\_\/]reverse/ and options['LHOST'].nil?
|
||||
options['LHOST'] = Rex::Socket.source_address
|
||||
end
|
||||
|
||||
|
||||
payload.datastore.merge! options
|
||||
|
||||
if (cmd =~ /^(p|y|r|d|c|h|j|x|b|v|w|n)$/)
|
||||
|
|
4
msfvenom
4
msfvenom
|
@ -152,9 +152,7 @@ require 'msf/core/payload_generator'
|
|||
k,v = x.split('=', 2)
|
||||
datastore[k.upcase] = v.to_s
|
||||
end
|
||||
|
||||
# if LHOST is not set auto set it
|
||||
if datastore['LHOST'].nil?
|
||||
if opts[:payload].to_s =~ /[\_\/]reverse/ and datastore['LHOST'].nil?
|
||||
datastore['LHOST'] = Rex::Socket.source_address
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue