File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
spec/lib/msf/core/auxiliary Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ # -*- coding: binary -*-
2
+ require 'spec_helper'
3
+
4
+ require 'msf/core/auxiliary/drdos'
5
+
6
+ describe Msf ::Auxiliary ::DRDoS do
7
+ subject do
8
+ mod = Module . new
9
+ mod . extend described_class
10
+ mod
11
+ end
12
+
13
+ describe '#prove_drdos' do
14
+ it 'should detect drdos when there is packet amplification only' do
15
+ map = { 'foo' => [ 'a' , 'b' ] }
16
+ result , _ = subject . prove_drdos ( map )
17
+ result . should be true
18
+ end
19
+
20
+ it 'should detect drdos when there is bandwidth amplification only' do
21
+ map = { 'foo' => [ 'foofoo' ] }
22
+ result , _ = subject . prove_drdos ( map )
23
+ result . should be true
24
+ end
25
+
26
+ it 'should detect drdos when there is packet and bandwidth amplification' do
27
+ map = { 'foo' => [ 'foofoo' , 'a' ] }
28
+ result , _ = subject . prove_drdos ( map )
29
+ result . should be true
30
+ end
31
+
32
+ it 'should not detect drdos when there is no packet and no bandwidth amplification' do
33
+ map = { 'foo' => [ 'foo' ] }
34
+ result , _ = subject . prove_drdos ( map )
35
+ result . should be false
36
+ end
37
+ end
38
+ end
You can’t perform that action at this time.
0 commit comments