CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/nops/x86/opty2.rb
Views: 11623
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
#
11
# Opty2
12
# -----
13
#
14
# This class implements single-byte NOP generation for X86. It takes from
15
# ADMmutate and from spoonfu.
16
#
17
###
18
class MetasploitModule < Msf::Nop
19
20
def initialize
21
super(
22
'Name' => 'Opty2',
23
'Description' => 'Opty2 multi-byte NOP generator',
24
'Author' => [ 'spoonm', 'optyx' ],
25
'License' => MSF_LICENSE,
26
'Arch' => ARCH_X86)
27
end
28
29
def generate_sled(length, opts = {})
30
opty = Rex::Nop::Opty2.new(
31
opts['BadChars'] || '',
32
opts['SaveRegisters'])
33
34
opty.generate_sled(length)
35
end
36
end
37
38