Skip to content

Commit 1394ad1

Browse files
committed
Break my double quote habit
Doesn't it feel better? C doesn't love me anymore.
1 parent 8376b4a commit 1394ad1

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

modules/auxiliary/gather/chromecast_wifi.rb

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
# Current source: https://github.com/rapid7/metasploit-framework
44
##
55

6-
require "msf/core"
6+
require 'msf/core'
77

88
class Metasploit4 < Msf::Auxiliary
99

1010
include Msf::Exploit::Remote::HttpClient
1111

1212
def initialize(info = {})
1313
super(update_info(info,
14-
"Name" => "Chromecast Wifi Enumeration",
15-
"Description" => %q{
14+
'Name' => 'Chromecast Wifi Enumeration',
15+
'Description' => %q{
1616
This module enumerates wireless access points through Chromecast.
1717
},
18-
"Author" => ["wvu"],
19-
"References" => [
20-
["URL", "https://en.wikipedia.org/wiki/Chromecast"]
18+
'Author' => ['wvu'],
19+
'References' => [
20+
['URL', 'https://en.wikipedia.org/wiki/Chromecast']
2121
],
22-
"License" => MSF_LICENSE
22+
'License' => MSF_LICENSE
2323
))
2424

2525
register_options([
@@ -32,42 +32,42 @@ def run
3232

3333
if res && res.code == 200
3434
waps = Rex::Ui::Text::Table.new(
35-
"Header" => "Wireless Access Points",
36-
"Columns" => [
37-
"BSSID",
38-
"PWR",
39-
"ENC",
40-
"CIPHER",
41-
"ESSID"
35+
'Header' => 'Wireless Access Points',
36+
'Columns' => [
37+
'BSSID',
38+
'PWR',
39+
'ENC',
40+
'CIPHER',
41+
'ESSID'
4242
],
43-
"SortIndex" => -1
43+
'SortIndex' => -1
4444
)
4545

4646
JSON.parse(res.body).each do |wap|
4747
waps << [
48-
wap["bssid"],
49-
wap["signal_level"],
50-
case wap["wpa_auth"]
48+
wap['bssid'],
49+
wap['signal_level'],
50+
case wap['wpa_auth']
5151
when 1
52-
"OPN"
52+
'OPN'
5353
when 5
54-
"WPA"
54+
'WPA'
5555
when 7
56-
"WPA2"
56+
'WPA2'
5757
else
58-
wap["wpa_auth"]
58+
wap['wpa_auth']
5959
end,
60-
case wap["wpa_cipher"]
60+
case wap['wpa_cipher']
6161
when 1
62-
""
62+
''
6363
when 3
64-
"TKIP"
64+
'TKIP'
6565
when 4
66-
"CCMP"
66+
'CCMP'
6767
else
68-
wap["wpa_cipher"]
68+
wap['wpa_cipher']
6969
end,
70-
wap["ssid"] + (wap["wpa_id"] ? " (*)" : "")
70+
wap['ssid'] + (wap['wpa_id'] ? ' (*)' : '')
7171
]
7272
end
7373

@@ -76,8 +76,8 @@ def run
7676
report_note(
7777
:host => rhost,
7878
:port => rport,
79-
:proto => "tcp",
80-
:type => "chromecast.wifi",
79+
:proto => 'tcp',
80+
:type => 'chromecast.wifi',
8181
:data => waps.to_csv
8282
)
8383
end
@@ -86,14 +86,14 @@ def run
8686
def scan
8787
begin
8888
send_request_raw(
89-
"method" => "POST",
90-
"uri" => "/setup/scan_wifi",
91-
"agent" => Rex::Text.rand_text_english(rand(42) + 1)
89+
'method' => 'POST',
90+
'uri' => '/setup/scan_wifi',
91+
'agent' => Rex::Text.rand_text_english(rand(42) + 1)
9292
)
9393
send_request_raw(
94-
"method" => "GET",
95-
"uri" => "/setup/scan_results",
96-
"agent" => Rex::Text.rand_text_english(rand(42) + 1)
94+
'method' => 'GET',
95+
'uri' => '/setup/scan_results',
96+
'agent' => Rex::Text.rand_text_english(rand(42) + 1)
9797
)
9898
rescue Rex::ConnectionRefused, Rex::ConnectionTimeout,
9999
Rex::HostUnreachable => e

0 commit comments

Comments
 (0)