Skip to content

Commit 8d3737d

Browse files
committed
Fix some stylistic issues
1 parent 93c7855 commit 8d3737d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lib/metasploit/framework/login_scanner/telnet.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
require 'metasploit/framework/telnet/client'
22
require 'metasploit/framework/login_scanner/base'
33
require 'metasploit/framework/login_scanner/rex_socket'
4+
45
module Metasploit
56
module Framework
67
module LoginScanner
7-
88
# This is the LoginScanner class for dealing with Telnet remote terminals.
99
# It is responsible for taking a single target, and a list of credentials
1010
# and attempting them. It then saves the results.
1111
class Telnet
12+
1213
include Metasploit::Framework::LoginScanner::Base
1314
include Metasploit::Framework::LoginScanner::RexSocket
1415
include Metasploit::Framework::Telnet::Client
@@ -25,11 +26,13 @@ class Telnet
2526
#
2627
# @return [Fixnum]
2728
attr_accessor :banner_timeout
29+
2830
# @!attribute verbosity
2931
# The timeout to wait for the response from a telnet command.
3032
#
3133
# @return [Fixnum]
3234
attr_accessor :telnet_timeout
35+
3336
# @!attribute verbosity
3437
# Prepend code to call before checking for a user login
3538
#
@@ -125,10 +128,11 @@ def set_sane_defaults
125128
create_login_ivars
126129
end
127130

128-
def print_error( message )
129-
return if !@parent
130-
@parent.print_error message
131+
def print_error(message)
132+
return unless @parent
133+
@parent.print_error(message)
131134
end
135+
132136
end
133137
end
134138
end

modules/auxiliary/scanner/telnet/brocade_enable_login.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def run_host(ip)
113113
send_delay: datastore['TCP::send_delay'],
114114
banner_timeout: datastore['TelnetBannerTimeout'],
115115
telnet_timeout: datastore['TelnetTimeout'],
116-
pre_login: lambda{ |s| raw_send("enable\r\n", nsock = s.sock) },
116+
pre_login: lambda { |s| raw_send("enable\r\n", s.sock) },
117117
framework: framework,
118118
framework_module: self,
119119
)

0 commit comments

Comments
 (0)