Add another line to the resplat regex.
parent
81d145ad81
commit
01fbbf16de
|
@ -32,7 +32,7 @@ end
|
||||||
def resplat(line)
|
def resplat(line)
|
||||||
if line =~ /This file is part of the Metasploit Framework/
|
if line =~ /This file is part of the Metasploit Framework/
|
||||||
return "# This module requires Metasploit: http//metasploit.com/download\n"
|
return "# This module requires Metasploit: http//metasploit.com/download\n"
|
||||||
elsif line =~ /redistribution and commercial/
|
elsif line =~ /# redistribution and commercial restrictions\./
|
||||||
return "# Current source: https://github.com/rapid7/metasploit-framework\n"
|
return "# Current source: https://github.com/rapid7/metasploit-framework\n"
|
||||||
else
|
else
|
||||||
return nil
|
return nil
|
||||||
|
@ -49,7 +49,7 @@ Find.find(dir) do |infile|
|
||||||
fixed = []
|
fixed = []
|
||||||
data.each_line do |line|
|
data.each_line do |line|
|
||||||
case line
|
case line
|
||||||
when /^[\x20\x09]*# This file is part of the Metasploit Framework and may be subject to/, /^[\x20\x09]*# redistribution and commercial restrictions\. Please see the Metasploit/, /^[\x20\x09]*# web site for more information on licensing and terms of use\./, /^[\x20\x09]*# http:\/\/metasploit.com\//
|
when /^[\x20\x09]*# This file is part of the Metasploit Framework and may be subject to/, /^[\x20\x09]*# redistribution and commercial restrictions\. Please see the Metasploit/, /^[\x20\x09]*# web site for more information on licensing and terms of use\./, /^[\x20\x09]*# http:\/\/metasploit.com\//, /# Framework web site for more information on licensing and terms of use./
|
||||||
new_line = resplat(line)
|
new_line = resplat(line)
|
||||||
fixed << new_line if new_line
|
fixed << new_line if new_line
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue