Files
metasploit-gs/lib/metasm/samples/preprocess-flatten.rb
T
Ramon de C Valle f124597a56 Code cleanups
git-svn-id: file:///home/svn/framework3/trunk@5773 4d416f70-5f16-0410-b530-b9f4589650da
2008-10-19 21:03:39 +00:00

19 lines
493 B
Ruby

#!/usr/bin/env ruby
# This file is part of Metasm, the Ruby assembly manipulation suite
# Copyright (C) 2007 Yoann GUILLOT
#
# Licence is LGPL, see LICENCE in the top-level directory
#
# this file takes preprocessor files as arguments
# it preprocesses their content and dump the result to stdout
# it also dumps all macro definitions
#
require 'metasm/preprocessor'
p = Metasm::Preprocessor.new
p.feed(ARGF.read)
raw = p.dump
puts p.dump_macros(p.definition.keys, false)
puts raw