set default connection tiemouts
loginscanners should have a default connection timeoutbug/bundler_fix
parent
1a0200f711
commit
a319d5270e
|
@ -39,9 +39,10 @@ module Metasploit
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_sane_defaults
|
def set_sane_defaults
|
||||||
self.port = DEFAULT_PORT if self.port.nil?
|
self.connection_timeout ||= 30
|
||||||
self.max_send_size = 0 if self.max_send_size.nil?
|
self.port ||= DEFAULT_PORT
|
||||||
self.send_delay = 0 if self.send_delay.nil?
|
self.max_send_size ||= 0
|
||||||
|
self.send_delay ||= 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -96,10 +96,12 @@ module Metasploit
|
||||||
# This method sets the sane defaults for things
|
# This method sets the sane defaults for things
|
||||||
# like timeouts and TCP evasion options
|
# like timeouts and TCP evasion options
|
||||||
def set_sane_defaults
|
def set_sane_defaults
|
||||||
|
self.connection_timeout ||= 30
|
||||||
self.port ||= DEFAULT_PORT
|
self.port ||= DEFAULT_PORT
|
||||||
self.max_send_size ||= 0
|
self.max_send_size ||= 0
|
||||||
self.send_delay ||= 0
|
self.send_delay ||= 0
|
||||||
self.ssl ||= false
|
|
||||||
|
self.ssl = false if self.ssl.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
# This method takes a response packet and checks to see
|
# This method takes a response packet and checks to see
|
||||||
|
|
|
@ -62,10 +62,11 @@ module Metasploit
|
||||||
# This method sets the sane defaults for things
|
# This method sets the sane defaults for things
|
||||||
# like timeouts and TCP evasion options
|
# like timeouts and TCP evasion options
|
||||||
def set_sane_defaults
|
def set_sane_defaults
|
||||||
self.port = DEFAULT_PORT if self.port.nil?
|
self.connection_timeout ||= 30
|
||||||
self.max_send_size = 0 if self.max_send_size.nil?
|
self.port ||= DEFAULT_PORT
|
||||||
self.send_delay = 0 if self.send_delay.nil?
|
self.max_send_size ||= 0
|
||||||
self.ftp_timeout = 16 if self.ftp_timeout.nil?
|
self.send_delay ||= 0
|
||||||
|
self.ftp_timeout ||= 16
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -92,6 +92,7 @@ module Metasploit
|
||||||
# This method sets the sane defaults for things
|
# This method sets the sane defaults for things
|
||||||
# like timeouts and TCP evasion options
|
# like timeouts and TCP evasion options
|
||||||
def set_sane_defaults
|
def set_sane_defaults
|
||||||
|
self.connection_timeout ||= 20
|
||||||
self.max_send_size = 0 if self.max_send_size.nil?
|
self.max_send_size = 0 if self.max_send_size.nil?
|
||||||
self.send_delay = 0 if self.send_delay.nil?
|
self.send_delay = 0 if self.send_delay.nil?
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,12 @@ module Metasploit
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_sane_defaults
|
def set_sane_defaults
|
||||||
self.port = DEFAULT_PORT if self.port.nil?
|
self.connection_timeout ||= 30
|
||||||
self.max_send_size = 0 if self.max_send_size.nil?
|
self.port ||= DEFAULT_PORT
|
||||||
self.send_delay = 0 if self.send_delay.nil?
|
self.max_send_size ||= 0
|
||||||
|
self.send_delay ||= 0
|
||||||
|
|
||||||
|
# Don't use ||= with booleans
|
||||||
self.send_lm = true if self.send_lm.nil?
|
self.send_lm = true if self.send_lm.nil?
|
||||||
self.send_ntlm = true if self.send_ntlm.nil?
|
self.send_ntlm = true if self.send_ntlm.nil?
|
||||||
self.send_spn = true if self.send_spn.nil?
|
self.send_spn = true if self.send_spn.nil?
|
||||||
|
|
|
@ -78,9 +78,10 @@ module Metasploit
|
||||||
# This method sets the sane defaults for things
|
# This method sets the sane defaults for things
|
||||||
# like timeouts and TCP evasion options
|
# like timeouts and TCP evasion options
|
||||||
def set_sane_defaults
|
def set_sane_defaults
|
||||||
self.port = DEFAULT_PORT if self.port.nil?
|
self.connection_timeout || 30
|
||||||
self.max_send_size = 0 if self.max_send_size.nil?
|
self.port ||= DEFAULT_PORT
|
||||||
self.send_delay = 0 if self.send_delay.nil?
|
self.max_send_size ||= 0
|
||||||
|
self.send_delay ||= 0
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -68,7 +68,8 @@ module Metasploit
|
||||||
|
|
||||||
# (see Base#set_sane_defaults)
|
# (see Base#set_sane_defaults)
|
||||||
def set_sane_defaults
|
def set_sane_defaults
|
||||||
self.port = DEFAULT_PORT if self.port.nil?
|
self.connection_timeout ||= 30
|
||||||
|
self.port ||= DEFAULT_PORT
|
||||||
self.max_send_size ||= 0
|
self.max_send_size ||= 0
|
||||||
self.send_delay ||= 0
|
self.send_delay ||= 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -70,7 +70,8 @@ module Metasploit
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_sane_defaults
|
def set_sane_defaults
|
||||||
self.port = DEFAULT_PORT if self.port.nil?
|
self.connection_timeout ||= 30
|
||||||
|
self.port ||= DEFAULT_PORT
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -96,6 +96,7 @@ module Metasploit
|
||||||
# This method sets the sane defaults for things
|
# This method sets the sane defaults for things
|
||||||
# like timeouts and TCP evasion options
|
# like timeouts and TCP evasion options
|
||||||
def set_sane_defaults
|
def set_sane_defaults
|
||||||
|
self.connection_timeout ||= 30
|
||||||
self.max_send_size ||= 0
|
self.max_send_size ||= 0
|
||||||
self.port ||= DEFAULT_PORT
|
self.port ||= DEFAULT_PORT
|
||||||
self.send_delay ||= 0
|
self.send_delay ||= 0
|
||||||
|
|
|
@ -90,6 +90,7 @@ module Metasploit
|
||||||
# This method sets the sane defaults for things
|
# This method sets the sane defaults for things
|
||||||
# like timeouts and TCP evasion options
|
# like timeouts and TCP evasion options
|
||||||
def set_sane_defaults
|
def set_sane_defaults
|
||||||
|
self.connection_timeout ||= 30
|
||||||
self.port ||= 5900
|
self.port ||= 5900
|
||||||
self.max_send_size ||= 0
|
self.max_send_size ||= 0
|
||||||
self.send_delay ||= 0
|
self.send_delay ||= 0
|
||||||
|
|
Loading…
Reference in New Issue