Break my double quote habit
Doesn't it feel better? C doesn't love me anymore.bug/bundler_fix
parent
8376b4aa2b
commit
1394ad1431
|
@ -3,7 +3,7 @@
|
|||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require "msf/core"
|
||||
require 'msf/core'
|
||||
|
||||
class Metasploit4 < Msf::Auxiliary
|
||||
|
||||
|
@ -11,15 +11,15 @@ class Metasploit4 < Msf::Auxiliary
|
|||
|
||||
def initialize(info = {})
|
||||
super(update_info(info,
|
||||
"Name" => "Chromecast Wifi Enumeration",
|
||||
"Description" => %q{
|
||||
'Name' => 'Chromecast Wifi Enumeration',
|
||||
'Description' => %q{
|
||||
This module enumerates wireless access points through Chromecast.
|
||||
},
|
||||
"Author" => ["wvu"],
|
||||
"References" => [
|
||||
["URL", "https://en.wikipedia.org/wiki/Chromecast"]
|
||||
'Author' => ['wvu'],
|
||||
'References' => [
|
||||
['URL', 'https://en.wikipedia.org/wiki/Chromecast']
|
||||
],
|
||||
"License" => MSF_LICENSE
|
||||
'License' => MSF_LICENSE
|
||||
))
|
||||
|
||||
register_options([
|
||||
|
@ -32,42 +32,42 @@ class Metasploit4 < Msf::Auxiliary
|
|||
|
||||
if res && res.code == 200
|
||||
waps = Rex::Ui::Text::Table.new(
|
||||
"Header" => "Wireless Access Points",
|
||||
"Columns" => [
|
||||
"BSSID",
|
||||
"PWR",
|
||||
"ENC",
|
||||
"CIPHER",
|
||||
"ESSID"
|
||||
'Header' => 'Wireless Access Points',
|
||||
'Columns' => [
|
||||
'BSSID',
|
||||
'PWR',
|
||||
'ENC',
|
||||
'CIPHER',
|
||||
'ESSID'
|
||||
],
|
||||
"SortIndex" => -1
|
||||
'SortIndex' => -1
|
||||
)
|
||||
|
||||
JSON.parse(res.body).each do |wap|
|
||||
waps << [
|
||||
wap["bssid"],
|
||||
wap["signal_level"],
|
||||
case wap["wpa_auth"]
|
||||
wap['bssid'],
|
||||
wap['signal_level'],
|
||||
case wap['wpa_auth']
|
||||
when 1
|
||||
"OPN"
|
||||
'OPN'
|
||||
when 5
|
||||
"WPA"
|
||||
'WPA'
|
||||
when 7
|
||||
"WPA2"
|
||||
'WPA2'
|
||||
else
|
||||
wap["wpa_auth"]
|
||||
wap['wpa_auth']
|
||||
end,
|
||||
case wap["wpa_cipher"]
|
||||
case wap['wpa_cipher']
|
||||
when 1
|
||||
""
|
||||
''
|
||||
when 3
|
||||
"TKIP"
|
||||
'TKIP'
|
||||
when 4
|
||||
"CCMP"
|
||||
'CCMP'
|
||||
else
|
||||
wap["wpa_cipher"]
|
||||
wap['wpa_cipher']
|
||||
end,
|
||||
wap["ssid"] + (wap["wpa_id"] ? " (*)" : "")
|
||||
wap['ssid'] + (wap['wpa_id'] ? ' (*)' : '')
|
||||
]
|
||||
end
|
||||
|
||||
|
@ -76,8 +76,8 @@ class Metasploit4 < Msf::Auxiliary
|
|||
report_note(
|
||||
:host => rhost,
|
||||
:port => rport,
|
||||
:proto => "tcp",
|
||||
:type => "chromecast.wifi",
|
||||
:proto => 'tcp',
|
||||
:type => 'chromecast.wifi',
|
||||
:data => waps.to_csv
|
||||
)
|
||||
end
|
||||
|
@ -86,14 +86,14 @@ class Metasploit4 < Msf::Auxiliary
|
|||
def scan
|
||||
begin
|
||||
send_request_raw(
|
||||
"method" => "POST",
|
||||
"uri" => "/setup/scan_wifi",
|
||||
"agent" => Rex::Text.rand_text_english(rand(42) + 1)
|
||||
'method' => 'POST',
|
||||
'uri' => '/setup/scan_wifi',
|
||||
'agent' => Rex::Text.rand_text_english(rand(42) + 1)
|
||||
)
|
||||
send_request_raw(
|
||||
"method" => "GET",
|
||||
"uri" => "/setup/scan_results",
|
||||
"agent" => Rex::Text.rand_text_english(rand(42) + 1)
|
||||
'method' => 'GET',
|
||||
'uri' => '/setup/scan_results',
|
||||
'agent' => Rex::Text.rand_text_english(rand(42) + 1)
|
||||
)
|
||||
rescue Rex::ConnectionRefused, Rex::ConnectionTimeout,
|
||||
Rex::HostUnreachable => e
|
||||
|
|
Loading…
Reference in New Issue