Skip to content

Commit 03e2cda

Browse files
committed
Make sample modules conform to modern mod format
Wow, these are old.
1 parent 562612f commit 03e2cda

File tree

5 files changed

+5
-40
lines changed

5 files changed

+5
-40
lines changed

documentation/samples/modules/auxiliary/sample.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@
1111

1212
require 'msf/core'
1313

14-
module Msf
15-
1614
###
1715
#
1816
# This sample auxiliary module simply displays the selected action and
1917
# registers a custom command that will show up when the module is used.
2018
#
2119
###
22-
class Auxiliary::Sample < Msf::Auxiliary
20+
class Metasploit4 < Msf::Auxiliary
2321

2422
def initialize
2523
super(
@@ -50,5 +48,3 @@ def cmd_aux_extra_command(*args)
5048
end
5149

5250
end
53-
54-
end

documentation/samples/modules/encoders/sample.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
1-
##
2-
# $Id$
3-
##
4-
51
##
62
# This file is part of the Metasploit Framework and may be subject to
73
# redistribution and commercial restrictions. Please see the Metasploit
84
# Framework web site for more information on licensing and terms of use.
95
# http://metasploit.com/framework/
106
##
117

12-
module Msf
13-
module Encoders
14-
158
###
169
#
1710
# This sample illustrates a very basic encoder that simply returns the block
1811
# that it's passed.
1912
#
2013
###
21-
class Sample < Msf::Encoder
14+
class Metasploit4 < Msf::Encoder
2215

2316
def initialize
2417
super(
@@ -40,6 +33,3 @@ def encode_block(state, buf)
4033
end
4134

4235
end
43-
44-
end
45-
end

documentation/samples/modules/exploits/sample.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
##
2-
# $Id$
3-
##
4-
51
##
62
# This file is part of the Metasploit Framework and may be subject to
73
# redistribution and commercial restrictions. Please see the Metasploit
@@ -11,15 +7,13 @@
117

128
require 'msf/core'
139

14-
module Msf
15-
1610
###
1711
#
1812
# This exploit sample shows how an exploit module could be written to exploit
1913
# a bug in an arbitrary TCP server.
2014
#
2115
###
22-
class Exploits::Sample < Msf::Exploit::Remote
16+
class Metasploit4 < Msf::Exploit::Remote
2317

2418
#
2519
# This exploit affects TCP servers, so we use the TCP client mixin.
@@ -88,4 +82,3 @@ def exploit
8882

8983
end
9084

91-
end

documentation/samples/modules/nops/sample.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@
1111

1212
require 'msf/core'
1313

14-
module Msf
15-
module Nops
16-
1714
###
1815
#
1916
# This class implements a very basic NOP sled generator that just returns a
2017
# string of 0x90's.
2118
#
2219
###
23-
class Sample < Msf::Nop
20+
class Metasploit4 < Msf::Nop
2421

2522
def initialize
2623
super(
@@ -39,6 +36,3 @@ def generate_sled(length, opts)
3936
end
4037

4138
end
42-
43-
end
44-
end

documentation/samples/modules/payloads/singles/sample.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@
1111

1212
require 'msf/core'
1313

14-
module Msf
15-
module Payloads
16-
module Singles
17-
1814
###
1915
#
2016
# This sample payload is designed to trigger a debugger exception via int3.
2117
#
2218
###
23-
module Sample
19+
module Metasploit4
2420

2521
include Msf::Payload::Single
2622

@@ -40,7 +36,3 @@ def initialize(info = {})
4036
end
4137

4238
end
43-
44-
end
45-
end
46-
end

0 commit comments

Comments
 (0)