enable Ruby 2.2 compat checks in Rubocop, correct multi/handler compat

bug/bundler_fix
Brent Cook 2017-08-02 06:18:02 -05:00
parent ff189147e7
commit 6f97e45b35
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,9 @@
# inherit_from: .rubocop_todo.yml
AllCops:
TargetRubyVersion: 2.2
Metrics/ClassLength:
Description: 'Most Metasploit modules are quite large. This is ok.'
Enabled: true

View File

@ -57,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote
timeout = datastore['ListenerTimeout'].to_i
loop do
break if session_created? && datastore['ExitOnSession']
break if timeout.positive? && (stime + timeout < Time.now.to_f)
break if timeout > 0 && (stime + timeout < Time.now.to_f)
sleep(1)
end
end