#!/usr/bin/env ruby # # $Id$ # # This tool will collect, export, and import ROP gadgets # from various file formats (PE, ELF, Macho) # $Revision$ # msfbase = __FILE__ while File.symlink?(msfbase) msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase)) end $:.unshift(File.join(File.dirname(msfbase), 'lib')) require 'fastlib' ')) $:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB'] require 'rex' require 'rex/ropbuilder' require 'rex/ui/text/output/stdio' require 'rex/ui/text/color' require 'optparse' def opt2i(o) o.index("0x")==0 ? o.hex : o.to_i end opts = {} color = true opt = OptionParser.new opt.banner = "Usage #{$PROGRAM_NAME}