From b9476c4f43e26ec206ee6a17ee3b381ea301c974 Mon Sep 17 00:00:00 2001 From: David Maloney Date: Mon, 12 Sep 2016 15:59:04 -0500 Subject: [PATCH] move over functional msfrop tool had to make a few inline tweaks to get the msfrop tool to work without the rest of msf mostly around the STDIO reimplementation MS-1722 --- bin/msfrop | 159 +++++++++++++++++++++++++++++++++++ lib/rex/rop_builder.rb | 2 + lib/rex/rop_builder/rop.rb | 36 ++++---- rex-rop_builder.gemspec | 4 +- spec/rex/rop_builder_spec.rb | 3 - 5 files changed, 183 insertions(+), 21 deletions(-) create mode 100755 bin/msfrop diff --git a/bin/msfrop b/bin/msfrop new file mode 100755 index 0000000..aa4c95e --- /dev/null +++ b/bin/msfrop @@ -0,0 +1,159 @@ +#!/usr/bin/env ruby +# -*- coding: binary -*- +# +# $Id$ +# +# This tool will collect, export, and import ROP gadgets +# from various file formats (PE, ELF, Macho) +# $Revision$ +# + +require 'rex/rop_builder' +require 'rex/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}