Add AutoVerifySessionTimeout Meterpreter advanced option

bug/bundler_fix
OJ 2015-06-17 00:20:59 +10:00
parent 77f506c0c8
commit 9dbdaf13ea
1 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ module MeterpreterOptions
[
OptBool.new('AutoLoadStdapi', [true, "Automatically load the Stdapi extension", true]),
OptBool.new('AutoVerifySession', [true, "Automatically verify and drop invalid sessions", true]),
OptInt.new('AutoVerifySessionTimeout', [false, "Timeout period to wait for session validation to occur, in seconds", 10]),
OptString.new('InitialAutoRunScript', [false, "An initial script to run on session creation (before AutoRunScript)", '']),
OptString.new('AutoRunScript', [false, "A script to run automatically on session creation.", '']),
OptBool.new('AutoSystemInfo', [true, "Automatically capture system information on initialization.", true]),
@ -43,7 +44,7 @@ module MeterpreterOptions
valid = true
if datastore['AutoVerifySession'] == true
if not session.is_valid_session?
if not session.is_valid_session?(datastore['AutoVerifySessionTimeout'].to_i)
print_error("Meterpreter session #{session.sid} is not valid and will be closed")
valid = false
end