Skip to content

Commit e86b18c

Browse files
committed
Add sanity check for NUM_REQUESTS
1 parent cd8b131 commit e86b18c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/msf/core/auxiliary/drdos.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ def initialize(info = {})
1717
], self.class)
1818
end
1919

20+
def setup
21+
super
22+
if spoofed? && datastore['NUM_REQUESTS'] < 1
23+
raise Msf::OptionValidateError.new(['NUM_REQUESTS']), 'The number of requests must be >= 1'
24+
end
25+
end
26+
2027
def prove_amplification(response_map)
2128
vulnerable = false
2229
proofs = []

0 commit comments

Comments
 (0)