lib/metasm/metasm/exe_format/main.rb
# encodes the executable as a string, checks that all relocations are
# resolved, and returns the raw string version
encodes the executable as a string, checks that all relocations are
resolved, and returns the raw string version
encodes the executable as a string checks that all relocations are resolved and returns the raw string version
def encode_string(*a)
		encode(*a)
		raise ["Unresolved relocations:", @encoded.reloc.map { |o, r| "#{r.target} " + (Backtrace.backtrace_str(r.backtrace) if r.backtrace).to_s }].join("\n") if not @encoded.reloc.empty?
		@encoded.data
	end
def encode_string ( * a ) encode ( * a ) raise [ "Unresolved relocations:" , @encoded . reloc . map { | o , r | "#{r.target} " + ( Backtrace . backtrace_str ( r . backtrace ) if r . backtrace ) . to_s } ] . join ( "\n" ) if not @encoded . reloc . empty? @encoded . data end
encodes the executable as a string, checks that all relocations are
resolved, and returns the raw string version
encodes the executable as a string checks that all relocations are resolved and returns the raw string version
a