parent
967c04e727
commit
8b70a94b34
|
@ -37,10 +37,16 @@ class Metasploit3 < Msf::Post
|
||||||
end
|
end
|
||||||
|
|
||||||
def progress
|
def progress
|
||||||
timeout = (datastore['DURATION'] < 1) ? 1 : (datastore['DURATION']*0.1)
|
duration = datastore['DURATION']
|
||||||
datastore['DURATION'].times do |i|
|
m = duration / 10
|
||||||
print_status("Recording: #{(Float(i+1)/datastore['DURATION'] * 100).round}% done...")
|
m = 1 if m == 0
|
||||||
select(nil, nil, nil, timeout)
|
|
||||||
|
duration.times do |i|
|
||||||
|
if i % m == 0
|
||||||
|
p = ((Float((i == 0) ? 1 : i+1) / duration) * 100).round
|
||||||
|
print_status("#{rhost} - #{p.to_s}%...")
|
||||||
|
end
|
||||||
|
select(nil, nil, nil, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue