Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/nops/x86/opty2.rb
24699 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
require 'rex/nop/opty2'
7
8
###
9
#
10
# Opty2
11
# -----
12
#
13
# This class implements single-byte NOP generation for X86. It takes from
14
# ADMmutate and from spoonfu.
15
#
16
###
17
class MetasploitModule < Msf::Nop
18
19
def initialize
20
super(
21
'Name' => 'Opty2',
22
'Description' => 'Opty2 multi-byte NOP generator',
23
'Author' => [ 'spoonm', 'optyx' ],
24
'License' => MSF_LICENSE,
25
'Arch' => ARCH_X86)
26
end
27
28
def generate_sled(length, opts = {})
29
opty = Rex::Nop::Opty2.new(
30
opts['BadChars'] || '',
31
opts['SaveRegisters']
32
)
33
34
opty.generate_sled(length)
35
end
36
end
37
38