Avoid double quotes in the initialize/elewhere

There is no need to have double quotes there for uninterpolated strings,
and every other module uses single quotes.
bug/bundler_fix
Tod Beardsley 2014-06-12 13:20:59 -05:00
parent 67d4097e1d
commit 1aa029dbed
No known key found for this signature in database
GPG Key ID: 1EFFB682ADB9F193
1 changed files with 23 additions and 23 deletions

View File

@ -3,7 +3,7 @@
# Current source: https://github.com/rapid7/metasploit-framework # Current source: https://github.com/rapid7/metasploit-framework
## ##
require "msf/core" require 'msf/core'
class Metasploit4 < Msf::Auxiliary class Metasploit4 < Msf::Auxiliary
@ -11,35 +11,35 @@ class Metasploit4 < Msf::Auxiliary
def initialize(info = {}) def initialize(info = {})
super(update_info(info, super(update_info(info,
"Name" => "Chromecast YouTube Remote Control", 'Name' => 'Chromecast YouTube Remote Control',
"Description" => %q{ 'Description' => %q{
This module acts as a simple remote control for Chromecast YouTube. This module acts as a simple remote control for Chromecast YouTube.
}, },
"Author" => ["wvu"], 'Author' => ['wvu'],
"References" => [ 'References' => [
["URL", "https://en.wikipedia.org/wiki/Chromecast"] ['URL', 'https://en.wikipedia.org/wiki/Chromecast']
], ],
"License" => MSF_LICENSE, 'License' => MSF_LICENSE,
"Actions" => [ 'Actions' => [
["Play", "Description" => "Play video"], ['Play', 'Description' => 'Play video'],
["Stop", "Description" => "Stop video"] ['Stop', 'Description' => 'Stop video']
], ],
"DefaultAction" => "Play" 'DefaultAction' => 'Play'
)) ))
register_options([ register_options([
Opt::RPORT(8008), Opt::RPORT(8008),
OptString.new("VID", [true, "Video ID", "kxopViU98Xo"]) OptString.new('VID', [true, 'Video ID', 'kxopViU98Xo'])
], self.class) ], self.class)
end end
def run def run
vid = datastore["VID"] vid = datastore['VID']
case action.name case action.name
when "Play" when 'Play'
res = play(vid) res = play(vid)
when "Stop" when 'Stop'
res = stop res = stop
end end
@ -58,11 +58,11 @@ class Metasploit4 < Msf::Auxiliary
def play(vid) def play(vid)
begin begin
send_request_cgi( send_request_cgi(
"method" => "POST", 'method' => 'POST',
"uri" => "/apps/YouTube", 'uri' => '/apps/YouTube',
"agent" => Rex::Text.rand_text_english(rand(42) + 1), 'agent' => Rex::Text.rand_text_english(rand(42) + 1),
"vars_post" => { 'vars_post' => {
"v" => vid 'v' => vid
} }
) )
rescue Rex::ConnectionRefused, Rex::ConnectionTimeout, rescue Rex::ConnectionRefused, Rex::ConnectionTimeout,
@ -76,9 +76,9 @@ class Metasploit4 < Msf::Auxiliary
def stop def stop
begin begin
send_request_raw( send_request_raw(
"method" => "DELETE", 'method' => 'DELETE',
"uri" => "/apps/YouTube", 'uri' => '/apps/YouTube',
"agent" => Rex::Text.rand_text_english(rand(42) + 1) 'agent' => Rex::Text.rand_text_english(rand(42) + 1)
) )
rescue Rex::ConnectionRefused, Rex::ConnectionTimeout, rescue Rex::ConnectionRefused, Rex::ConnectionTimeout,
Rex::HostUnreachable => e Rex::HostUnreachable => e