Enhance regular to match blank before include.

GSoC/Meterpreter_Web_Console
Green-m 2018-10-17 16:20:10 +08:00
parent 0ccebd9916
commit 5df6f11cfc
No known key found for this signature in database
GPG Key ID: 7A4A0E684B5D6747
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ module Metasploit
# @return [String] The normalized code.
def self.normalize_code(code, headers)
code = code.lines.map { |line|
if line =~ /^#include <([[:print:]]+)>$/
if line =~ /^\s*#include <([[:print:]]+)>$/
%Q|<%= headers.include('#{$1}') %>\n|
else
line