Added protection for division by 0 in the enum_domain code
parent
0d4feb9fce
commit
3519aff146
|
@ -365,7 +365,11 @@ class Metasploit3 < Msf::Post
|
|||
result = client.railgun.netapi32.NetServerEnum(nil,100,4,buffersize,4,4,domain_enum,nil,nil)
|
||||
# Estimate new buffer size on percentage recovered.
|
||||
percent_found = (result['entriesread'].to_f/result['totalentries'].to_f)
|
||||
if percent_found > 0
|
||||
buffersize = (buffersize/percent_found).to_i
|
||||
else
|
||||
buffersize += 500
|
||||
end
|
||||
|
||||
while result['return'] == 234
|
||||
buffersize = buffersize + 500
|
||||
|
|
Loading…
Reference in New Issue