Skip to content

Commit 09d931e

Browse files
committed
Split assignment across two lines for clarity
https://github.com/bbatsov/ruby-style-guide#use-if-case-returns
1 parent 15ff70f commit 09d931e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/msf/core/exploit/file_dropper.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,12 @@ def file_dropper_check_cwd?(path)
262262
if session.type == 'meterpreter'
263263
return true if path == session.fs.dir.pwd
264264
else
265-
pwd = if session.platform == 'windows'
266-
session.shell_command_token('echo %cd%').strip
267-
else
268-
session.shell_command_token('pwd').strip
269-
end
265+
pwd =
266+
if session.platform == 'windows'
267+
session.shell_command_token('echo %cd%').strip
268+
else
269+
session.shell_command_token('pwd').strip
270+
end
270271

271272
return true if path == pwd
272273
end

0 commit comments

Comments
 (0)