Skip to content

Commit 0f346dd

Browse files
committed
Some whitespace and ruby -c fixes
1 parent ab64c42 commit 0f346dd

File tree

1 file changed

+3
-8
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher

1 file changed

+3
-8
lines changed

lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ def cmd_channel(*args)
128128

129129
mode = nil
130130
chan = nil
131-
data = []
132131

133132
# Parse options
134133
@@channel_opts.parse(args) { |opt, idx, val|
@@ -331,7 +330,6 @@ def cmd_migrate_help
331330
#
332331
# @param args [Array<String>] Commandline arguments, only -h or a pid
333332
# @return [void]
334-
335333
def cmd_migrate(*args)
336334
if ( args.length == 0 or args.include?("-h") )
337335
cmd_migrate_help
@@ -367,8 +365,6 @@ def cmd_load(*args)
367365
args.unshift("-h")
368366
end
369367

370-
modules = nil
371-
372368
@@load_opts.parse(args) { |opt, idx, val|
373369
case opt
374370
when "-l"
@@ -503,11 +499,11 @@ def cmd_run(*args)
503499
reloaded_mod = client.framework.modules.reload_module(original_mod)
504500

505501
unless reloaded_mod
506-
error = client.framework.modules.module_load_error_by_path[original_mod.file_path]
502+
error = client.framework.modules.module_load_error_by_path[original_mod.file_path]
507503
print_error("Failed to reload module: #{error}")
508504

509505
return
510-
end
506+
end
511507

512508
opts = (args + [ "SESSION=#{client.sid}" ]).join(',')
513509
reloaded_mod.run_simple(
@@ -694,8 +690,7 @@ def cmd_write(*args)
694690
}
695691

696692
# Find the channel associated with this cid, assuming the cid is valid.
697-
if ((!cid) or
698-
(!(channel = client.find_channel(cid))))
693+
if ((!cid) or (!(channel = client.find_channel(cid))))
699694
print_error("Invalid channel identifier specified.")
700695
return true
701696
end

0 commit comments

Comments
 (0)