Skip to content

Commit eeea1d9

Browse files
author
Tod Beardsley
committed
Regression test for check in exploits
1 parent a852304 commit eeea1d9

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

test/modules/exploits/test/check.rb

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
##
2+
# This file is part of the Metasploit Framework and may be subject to
3+
# redistribution and commercial restrictions. Please see the Metasploit
4+
# Framework web site for more information on licensing and terms of use.
5+
# http://metasploit.com/framework/
6+
##
7+
8+
require 'msf/core'
9+
10+
class Metasploit3 < Msf::Exploit
11+
12+
def initialize(info = {})
13+
super(update_info(info,
14+
'Name' => "Check Test Exploit",
15+
'Description' => %q{
16+
This module ensures that 'check' actually functions for Exploit modules.
17+
},
18+
'References' =>
19+
[
20+
[ 'OSVDB', '0' ]
21+
],
22+
'Author' =>
23+
[
24+
'todb'
25+
],
26+
'License' => MSF_LICENSE,
27+
'DisclosureDate' => 'May 23 2013'
28+
))
29+
30+
register_options(
31+
[
32+
Opt::RPORT(80)
33+
], self.class)
34+
end
35+
36+
def check
37+
print_debug "Check is successful"
38+
return Msf::Exploit::CheckCode::Vulnerable
39+
end
40+
41+
def exploit
42+
print_debug "Exploit is successful."
43+
end
44+
45+
end

test/scripts/test-check.rc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
use auxiliary/test/check
55
set rhost www.metasploit.com
66
check
7-
exit
7+
8+
use exploit/test/check
9+
set rhost www.metasploit.com
10+
check

0 commit comments

Comments
 (0)