@@ -20,13 +20,13 @@ def initialize
20
20
super (
21
21
'Name' => 'Brocde Enable Login Check Scanner' ,
22
22
'Description' => %q{
23
- This module will test a Brocade network device for a privilged
23
+ This module will test a Brocade network device for a privilged
24
24
(Enable) login on a range of machines and report successful
25
- logins. If you have loaded a database plugin and connected
25
+ logins. If you have loaded a database plugin and connected
26
26
to a database this module will record successful
27
27
logins and hosts so you can track your access.
28
- This is not a login/telnet authentication. Config should NOT
29
- have 'enable telnet authentication' in it. This will test the
28
+ This is not a login/telnet authentication. Config should NOT
29
+ have 'enable telnet authentication' in it. This will test the
30
30
config that contains 'aaa authentication enable default local'
31
31
Tested against:
32
32
ICX6450-24 SWver 07.4.00bT311
@@ -57,13 +57,13 @@ def get_username_from_config(un_list,ip)
57
57
sock . puts ( " \r \n " ) #paging
58
58
config << sock . recv ( 1024 )
59
59
#there seems to be some buffering issues. so we want to match that we're back at a prompt, as well as received the 'end' of the config.
60
- break if config . match ( />$/ ) and config . match ( /end/ )
60
+ break if config . match ( />$/ ) and config . match ( /end/ )
61
61
end #pull the entire config
62
62
config . each_line do |un |
63
63
if un . match ( /^username/ )
64
- found_username = un . split ( " " ) [ 1 ] . strip
65
- un_list . push ( found_username )
66
- print_status ( " Found: #{ found_username } @#{ ip } " )
64
+ found_username = un . split ( " " ) [ 1 ] . strip
65
+ un_list . push ( found_username )
66
+ print_status ( " Found: #{ found_username } @#{ ip } " )
67
67
end #username match
68
68
end #each line in config
69
69
end #end config/running-config loop
0 commit comments