Skip to content

Commit b7b7cdd

Browse files
committed
Nops: Add cmd/generic
1 parent 7d3bff6 commit b7b7cdd

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

modules/nops/cmd/generic.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
##
2+
# This module requires Metasploit: https://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
class MetasploitModule < Msf::Nop
7+
def initialize
8+
super(
9+
'Name' => 'Generic Command Nop Generator',
10+
'Alias' => 'cmd_generic',
11+
'Description' => 'Generates harmless padding for command payloads.',
12+
'Author' => ['hdm', 'bcoles'],
13+
'License' => MSF_LICENSE,
14+
'Arch' => ARCH_CMD)
15+
end
16+
17+
# Generate valid commands up to the requested length
18+
def generate_sled(length, _opts = {})
19+
# Default to just spaces for now
20+
' ' * length
21+
end
22+
end

0 commit comments

Comments
 (0)