Use LPORT if opts[:lport] is undefined
`nil.to_i` returns 0 which will short circuit the || resulting in port 0 being used. nil should be checked for prior to casting to int.bug/bundler_fix
parent
920d8c6ad7
commit
d9655fc882
|
@ -56,7 +56,7 @@ module Msf::Payload::TransportConfig
|
|||
{
|
||||
:scheme => 'http',
|
||||
:lhost => opts[:lhost] || datastore['LHOST'],
|
||||
:lport => opts[:lport].to_i || datastore['LPORT'].to_i,
|
||||
:lport => (opts[:lport] || datastore['LPORT']).to_i,
|
||||
:uri => uri,
|
||||
:comm_timeout => datastore['SessionCommunicationTimeout'].to_i,
|
||||
:retry_total => datastore['SessionRetryTotal'].to_i,
|
||||
|
|
Loading…
Reference in New Issue