File tree Expand file tree Collapse file tree 1 file changed +33
-33
lines changed Expand file tree Collapse file tree 1 file changed +33
-33
lines changed Original file line number Diff line number Diff line change @@ -30,41 +30,41 @@ def initialize(info = {})
30
30
def run
31
31
res = scan
32
32
33
- if res && res . code == 200
34
- waps = Rex ::Ui ::Text ::Table . new (
35
- 'Header' => 'Wireless Access Points' ,
36
- 'Columns' => [
37
- 'BSSID' ,
38
- 'PWR' ,
39
- 'ENC' ,
40
- 'CIPHER' ,
41
- 'AUTH' ,
42
- 'ESSID'
43
- ] ,
44
- 'SortIndex' => -1
45
- )
33
+ return unless res && res . code == 200
46
34
47
- JSON . parse ( res . body ) . each do |wap |
48
- waps << [
49
- wap [ 'bssid' ] ,
50
- wap [ 'signal_level' ] ,
51
- enc ( wap ) ,
52
- cipher ( wap ) ,
53
- auth ( wap ) ,
54
- wap [ 'ssid' ] + ( wap [ 'wpa_id' ] ? ' (*)' : '' )
55
- ]
56
- end
57
-
58
- print_line ( waps . to_s )
59
-
60
- report_note (
61
- :host => rhost ,
62
- :port => rport ,
63
- :proto => 'tcp' ,
64
- :type => 'chromecast.wifi' ,
65
- :data => waps . to_csv
66
- )
35
+ waps = Rex ::Ui ::Text ::Table . new (
36
+ 'Header' => 'Wireless Access Points' ,
37
+ 'Columns' => [
38
+ 'BSSID' ,
39
+ 'PWR' ,
40
+ 'ENC' ,
41
+ 'CIPHER' ,
42
+ 'AUTH' ,
43
+ 'ESSID'
44
+ ] ,
45
+ 'SortIndex' => -1
46
+ )
47
+
48
+ JSON . parse ( res . body ) . each do |wap |
49
+ waps << [
50
+ wap [ 'bssid' ] ,
51
+ wap [ 'signal_level' ] ,
52
+ enc ( wap ) ,
53
+ cipher ( wap ) ,
54
+ auth ( wap ) ,
55
+ wap [ 'ssid' ] + ( wap [ 'wpa_id' ] ? ' (*)' : '' )
56
+ ]
67
57
end
58
+
59
+ print_line ( waps . to_s )
60
+
61
+ report_note (
62
+ :host => rhost ,
63
+ :port => rport ,
64
+ :proto => 'tcp' ,
65
+ :type => 'chromecast.wifi' ,
66
+ :data => waps . to_csv
67
+ )
68
68
end
69
69
70
70
def scan
You can’t perform that action at this time.
0 commit comments