2007-02-18 00:10:39 +00:00
|
|
|
##
|
2008-10-02 05:23:59 +00:00
|
|
|
# $Id$
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
|
2005-10-02 19:32:52 +00:00
|
|
|
require 'msf/core'
|
|
|
|
require 'rex/nop/opty2'
|
|
|
|
|
|
|
|
|
|
|
|
###
|
|
|
|
#
|
|
|
|
# Opty2
|
|
|
|
# -----
|
|
|
|
#
|
|
|
|
# This class implements single-byte NOP generation for X86. It takes from
|
|
|
|
# ADMmutate and from spoonfu.
|
|
|
|
#
|
|
|
|
###
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Nop
|
2005-10-02 19:32:52 +00:00
|
|
|
|
|
|
|
def initialize
|
|
|
|
super(
|
|
|
|
'Name' => 'Opty2',
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'Description' => 'Opty2 multi-byte NOP generator',
|
|
|
|
'Author' => [ 'spoonm', 'optyx' ],
|
2006-01-21 22:10:20 +00:00
|
|
|
'License' => MSF_LICENSE,
|
2005-10-02 19:32:52 +00:00
|
|
|
'Arch' => ARCH_X86)
|
|
|
|
end
|
|
|
|
|
2005-12-30 05:09:45 +00:00
|
|
|
def generate_sled(length, opts = {})
|
2005-10-02 19:32:52 +00:00
|
|
|
opty = Rex::Nop::Opty2.new(
|
|
|
|
opts['BadChars'] || '',
|
|
|
|
opts['SaveRegisters'])
|
|
|
|
|
|
|
|
opty.generate_sled(length)
|
|
|
|
end
|
|
|
|
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|