Skip to content

Commit 5127207

Browse files
Land #20134, modules/auxiliary/parser: Resolve RuboCop violations
2 parents 4837cf7 + 6db17f0 commit 5127207

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

modules/auxiliary/parser/unattend.rb

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

6-
76
class MetasploitModule < Msf::Auxiliary
87

9-
def initialize(info={})
10-
super( update_info( info,
11-
'Name' => 'Auxilliary Parser Windows Unattend Passwords',
8+
def initialize(info = {})
9+
super(
10+
update_info(
11+
info,
12+
'Name' => 'Auxiliary Parser Windows Unattend Passwords',
1213
'Description' => %q{
13-
This module parses Unattend files in the target directory.
14+
This module parses Windows answer files (Unattend files) in the target directory.
1415
15-
See also: post/windows/gather/enum_unattend
16-
},
17-
'License' => MSF_LICENSE,
18-
'Author' =>
19-
[
16+
See also: post/windows/gather/enum_unattend
17+
},
18+
'License' => MSF_LICENSE,
19+
'Author' => [
2020
'Ben Campbell',
2121
],
22-
'References' =>
23-
[
22+
'References' => [
2423
['URL', 'https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-8.1-and-8/ff715801(v=win.10)'],
2524
['URL', 'https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc749415(v=ws.10)'],
26-
['URL', 'https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc732280(v=ws.10)']
25+
['URL', 'https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc732280(v=ws.10)'],
26+
['URL', 'https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/update-windows-settings-and-scripts-create-your-own-answer-file-sxs?view=windows-11'],
2727
],
28-
))
28+
'Notes' => {
29+
'Stability' => [CRASH_SAFE],
30+
'SideEffects' => [],
31+
'Reliability' => []
32+
}
33+
)
34+
)
2935

3036
register_options([
3137
OptPath.new('PATH', [true, 'Directory or file to parse.']),
@@ -35,9 +41,9 @@ def initialize(info={})
3541

3642
def run
3743
if datastore['RECURSIVE']
38-
ext = "**/*.xml"
44+
ext = '**/*.xml'
3945
else
40-
ext = "/*.xml"
46+
ext = '/*.xml'
4147
end
4248

4349
if datastore['PATH'].ends_with?('.xml')
@@ -64,4 +70,3 @@ def run
6470
end
6571
end
6672
end
67-

0 commit comments

Comments
 (0)