Skip to content

Commit 91aa5fa

Browse files
committed
Some simple ruby convention changes that hopefully make ruby people happy
1 parent 3c1ce50 commit 91aa5fa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/msf/core/exploit/tincd.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ def init_ciphers(server_file, client_file)
134134
# from the server, this method will decide which message has to be sent next
135135
#
136136
def process_data(data)
137-
unless data.nil?
138-
@inbuffer += data
139-
end
137+
@inbuffer += data if data
140138
case @state
141139
when :id_state
142140
if line?
@@ -262,15 +260,15 @@ def read_line
262260
idx = @inbuffer.index("\n")
263261
data = @inbuffer.slice!(0, idx)
264262
@inbuffer.lstrip!
265-
return data
263+
data
266264
end
267265

268266
#
269267
# Check if we already received a newline, meaning we got an
270268
# entire message for the next protocol step
271269
#
272270
def line?
273-
!@inbuffer.match("\n").nil?
271+
!!(@inbuffer.match("\n"))
274272
end
275273

276274
#

0 commit comments

Comments
 (0)