Break my double quote habit

Doesn't it feel better? C doesn't love me anymore.
bug/bundler_fix
William Vu 2014-06-17 14:22:55 -05:00
parent 8376b4aa2b
commit 1394ad1431
No known key found for this signature in database
GPG Key ID: E761DCB4C1629024
1 changed files with 36 additions and 36 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,15 +11,15 @@ class Metasploit4 < Msf::Auxiliary
def initialize(info = {}) def initialize(info = {})
super(update_info(info, super(update_info(info,
"Name" => "Chromecast Wifi Enumeration", 'Name' => 'Chromecast Wifi Enumeration',
"Description" => %q{ 'Description' => %q{
This module enumerates wireless access points through Chromecast. This module enumerates wireless access points through Chromecast.
}, },
"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
)) ))
register_options([ register_options([
@ -32,42 +32,42 @@ class Metasploit4 < Msf::Auxiliary
if res && res.code == 200 if res && res.code == 200
waps = Rex::Ui::Text::Table.new( waps = Rex::Ui::Text::Table.new(
"Header" => "Wireless Access Points", 'Header' => 'Wireless Access Points',
"Columns" => [ 'Columns' => [
"BSSID", 'BSSID',
"PWR", 'PWR',
"ENC", 'ENC',
"CIPHER", 'CIPHER',
"ESSID" 'ESSID'
], ],
"SortIndex" => -1 'SortIndex' => -1
) )
JSON.parse(res.body).each do |wap| JSON.parse(res.body).each do |wap|
waps << [ waps << [
wap["bssid"], wap['bssid'],
wap["signal_level"], wap['signal_level'],
case wap["wpa_auth"] case wap['wpa_auth']
when 1 when 1
"OPN" 'OPN'
when 5 when 5
"WPA" 'WPA'
when 7 when 7
"WPA2" 'WPA2'
else else
wap["wpa_auth"] wap['wpa_auth']
end, end,
case wap["wpa_cipher"] case wap['wpa_cipher']
when 1 when 1
"" ''
when 3 when 3
"TKIP" 'TKIP'
when 4 when 4
"CCMP" 'CCMP'
else else
wap["wpa_cipher"] wap['wpa_cipher']
end, end,
wap["ssid"] + (wap["wpa_id"] ? " (*)" : "") wap['ssid'] + (wap['wpa_id'] ? ' (*)' : '')
] ]
end end
@ -76,8 +76,8 @@ class Metasploit4 < Msf::Auxiliary
report_note( report_note(
:host => rhost, :host => rhost,
:port => rport, :port => rport,
:proto => "tcp", :proto => 'tcp',
:type => "chromecast.wifi", :type => 'chromecast.wifi',
:data => waps.to_csv :data => waps.to_csv
) )
end end
@ -86,14 +86,14 @@ class Metasploit4 < Msf::Auxiliary
def scan def scan
begin begin
send_request_raw( send_request_raw(
"method" => "POST", 'method' => 'POST',
"uri" => "/setup/scan_wifi", 'uri' => '/setup/scan_wifi',
"agent" => Rex::Text.rand_text_english(rand(42) + 1) 'agent' => Rex::Text.rand_text_english(rand(42) + 1)
) )
send_request_raw( send_request_raw(
"method" => "GET", 'method' => 'GET',
"uri" => "/setup/scan_results", 'uri' => '/setup/scan_results',
"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