Skip to content

Commit 3e588ff

Browse files
committed
Land rapid7#6202, unbalanced angle brackets fixes
2 parents 8f4046d + 43229c1 commit 3e588ff

File tree

8 files changed

+21
-9
lines changed

8 files changed

+21
-9
lines changed

modules/auxiliary/scanner/http/cisco_ssl_vpn_priv_esc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def initialize(info = {})
2121
'Author' =>
2222
[
2323
'jclaudius <jclaudius[at]trustwave.com>',
24-
'lguay <laura.r.guay[at]gmail.com'
24+
'lguay <laura.r.guay[at]gmail.com>'
2525
],
2626
'License' => MSF_LICENSE,
2727
'References' =>

modules/auxiliary/scanner/quake/server_info.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def initialize(info = {})
2020
This module uses the getstatus or getinfo request to obtain
2121
information from a Quakeserver.
2222
),
23-
'Author' => 'Jon Hart <jon_hart[at]rapid7.com',
23+
'Author' => 'Jon Hart <jon_hart[at]rapid7.com>',
2424
'References' =>
2525
[
2626
['URL', 'ftp://ftp.idsoftware.com/idstuff/quake3/docs/server.txt']

modules/exploits/windows/http/kaseya_uploadimage_file_upload.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def initialize(info = {})
2323
},
2424
'Author' =>
2525
[
26-
'Thomas Hibbert <[email protected]' # Vulnerability discovery and MSF module
26+
'Thomas Hibbert <[email protected]>' # Vulnerability discovery and MSF module
2727
],
2828
'License' => MSF_LICENSE,
2929
'References' =>

modules/exploits/windows/mysql/mysql_start_up.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def initialize(info = {})
2424
'Author' =>
2525
[
2626
'sinn3r',
27-
'Sean Verity <veritysr1980[at]gmail.com'
27+
'Sean Verity <veritysr1980[at]gmail.com>'
2828
],
2929
'DefaultOptions' =>
3030
{

modules/exploits/windows/smb/psexec_psh.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def initialize(info = {})
3636

3737
'Author' => [
3838
'Royce @R3dy__ Davis <rdavis[at]accuvant.com>', # PSExec command module
39-
'RageLtMan <rageltman[at]sempervictus' # PSH exploit, libs, encoders
39+
'RageLtMan <rageltman[at]sempervictus>' # PSH exploit, libs, encoders
4040
],
4141
'License' => MSF_LICENSE,
4242
'Privileged' => true,

modules/post/multi/gather/lastpass_creds.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def initialize(info = {})
1919
'Author' => [
2020
'Alberto Garcia Illera <agarciaillera[at]gmail.com>', # original module and research
2121
'Martin Vigo <martinvigo[at]gmail.com>', # original module and research
22-
'Jon Hart <jon_hart[at]rapid7.com' # module rework and cleanup
22+
'Jon Hart <jon_hart[at]rapid7.com>' # module rework and cleanup
2323
],
2424
'Platform' => %w(linux osx unix win),
2525
'References' => [['URL', 'http://www.martinvigo.com/a-look-into-lastpass/']],

modules/post/windows/gather/phish_windows_credentials.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def initialize(info={})
2020
'License' => MSF_LICENSE,
2121
'Author' =>
2222
[
23-
'Wesley Neelen <security[at]forsec.nl', # Metasploit module, @wez3forsec on Twitter
23+
'Wesley Neelen <security[at]forsec.nl>', # Metasploit module, @wez3forsec on Twitter
2424
'Matt Nelson' # Original powershell script, @enigma0x3 on Twitter
2525
],
2626
'References' => [ 'URL', 'https://forsec.nl/2015/02/windows-credentials-phishing-using-metasploit' ],

tools/dev/msftidy.rb

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ def check_badchars
317317
next
318318
end
319319

320+
# XXX: note that this is all very fragile and regularly incorrectly parses
321+
# the author
320322
#
321323
# Mark our 'Author' block
322324
#
@@ -328,10 +330,12 @@ def check_badchars
328330

329331

330332
#
331-
# While in 'Author' block, check for Twitter handles
333+
# While in 'Author' block, check for malformed authors
332334
#
333335
if in_super and in_author
334-
if line =~ /Author/
336+
if line =~ /Author['"]\s*=>\s*['"](.*)['"],/
337+
author_name = Regexp.last_match(1)
338+
elsif line =~ /Author/
335339
author_name = line.scan(/\[[[:space:]]*['"](.+)['"]/).flatten[-1] || ''
336340
else
337341
author_name = line.scan(/['"](.+)['"]/).flatten[-1] || ''
@@ -344,6 +348,14 @@ def check_badchars
344348
if not author_name.ascii_only?
345349
error("Please avoid unicode or non-printable characters in Author")
346350
end
351+
352+
unless author_name.empty?
353+
author_open_brackets = author_name.scan('<').size
354+
author_close_brackets = author_name.scan('>').size
355+
if author_open_brackets != author_close_brackets
356+
error("Author has unbalanced brackets: #{author_name}")
357+
end
358+
end
347359
end
348360
end
349361
end

0 commit comments

Comments
 (0)