/
githubmirror
/
metasploit-framework
Обзор
Документация
Войти
/
githubmirror
/
metasploit-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
lib/metasploit/framework/compiler/utils.rb
27 строк
654 B
Green-m
Fix regular
17 окт 2018, 13:34
Не верифицирован
17 окт 2018, 13:34
ef3b1df
Код
Авторство
О чём код?
module Metasploit module Framework module Compiler module Utils # Returns the normalized C code (with headers). # # @param code [String] The C source code. # @param headers [Metasploit::Framework::Compiler::Headers::Win32] # @return [String] The normalized code. def self.normalize_code(code, headers) code = code.lines.map { |line| if line =~ /^\s*#include <([[:print:]]+)>$/ h = headers.include("#{$1}") %Q|#{h}\n| else line end }.join code end end end end end