File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
spec/lib/msf/core/auxiliary Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,11 @@ def prove_amplification(response_map)
46
46
bandwidth_amplification = total_size - request . size
47
47
if bandwidth_amplification > 0
48
48
vulnerable = true
49
- multiplier = total_size / request . size
49
+ if request . size == 0
50
+ multiplier = total_size
51
+ else
52
+ multiplier = total_size / request . size
53
+ end
50
54
this_proof += "a #{ multiplier } x, #{ bandwidth_amplification } -byte bandwidth amplification"
51
55
else
52
56
this_proof += 'no bandwidth amplification'
Original file line number Diff line number Diff line change 34
34
result , _ = subject . prove_amplification ( map )
35
35
expect ( result ) . to be false
36
36
end
37
+
38
+ it 'should handle empty responses' do
39
+ map = { '' => [ 'foo' ] }
40
+ result , _ = subject . prove_amplification ( map )
41
+ expect ( result ) . to be true
42
+ end
37
43
end
38
44
end
You can’t perform that action at this time.
0 commit comments