1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00

Fix test/post modules

Adds test/lib/ to the load path in all modules if it isn't already
there. Makes 'loadpath test/modules/' actually work for all modules.
This commit is contained in:
James Lee 2013-09-11 13:09:32 -05:00
parent 6ba9693d5d
commit ad31a35231
5 changed files with 13 additions and 12 deletions

View File

@ -1,4 +1,5 @@
$:.push "test/lib" unless $:.include? "test/lib"
require 'module_test'
#load 'test/lib/module_test.rb'

View File

@ -1,6 +1,3 @@
##
# $Id$
##
##
# This file is part of the Metasploit Framework and may be subject to
@ -13,6 +10,9 @@ require 'msf/core'
require 'rex'
require 'msf/core/post/windows/railgun'
$:.push "test/lib" unless $:.include? "test/lib"
require 'module_test'
class Metasploit3 < Msf::Post
include Msf::ModuleTest::PostTest
@ -24,7 +24,6 @@ class Metasploit3 < Msf::Post
'Description' => %q{ This module will test railgun code used in post modules},
'License' => MSF_LICENSE,
'Author' => [ 'kernelsmith'],
'Version' => '$Revision$',
'Platform' => [ 'windows' ]
))

View File

@ -1,8 +1,4 @@
##
# $Id$
##
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
@ -14,6 +10,9 @@ require 'msf/core'
require 'rex'
require 'msf/core/post/windows/registry'
$:.push "test/lib" unless $:.include? "test/lib"
require 'module_test'
class Metasploit3 < Msf::Post
include Msf::ModuleTest::PostTest
@ -28,7 +27,6 @@ class Metasploit3 < Msf::Post
'kernelsmith', # original
'egypt', # PostTest conversion
],
'Version' => '$Revision$',
'Platform' => [ 'windows' ]
))
end

View File

@ -6,6 +6,9 @@ require 'msf/core'
require 'rex'
require 'msf/core/post/windows/services'
$:.push "test/lib" unless $:.include? "test/lib"
require 'module_test'
class Metasploit3 < Msf::Post
include Msf::Post::Windows::Services

View File

@ -1,5 +1,6 @@
require 'test/lib/module_test'
$:.push "test/lib" unless $:.include? "test/lib"
require 'module_test'
#load 'test/lib/module_test.rb'
#load 'lib/rex/text.rb'
@ -15,11 +16,10 @@ class Metasploit4 < Msf::Post
def initialize(info={})
super( update_info( info,
'Name' => 'Testing remote unix system manipulation',
'Name' => 'Testing Remote Unix System Manipulation',
'Description' => %q{ This module will test Post::File API methods },
'License' => MSF_LICENSE,
'Author' => [ 'egypt'],
'Version' => '$Revision$',
'Platform' => [ 'linux', 'java' ],
'SessionTypes' => [ 'meterpreter', 'shell' ]
))