Move CREATE_SESSION option to advanced option CreateSession

GSoC/Meterpreter_Web_Console
Stephen Haywood 2018-12-11 22:47:31 -05:00 committed by William Vu
parent 8a7187ad79
commit eceb47a9da
4 changed files with 4 additions and 9 deletions

View File

@ -15,14 +15,9 @@ module CommandShellOptions
def initialize(info = {})
super(info)
register_options(
[
OptBool.new('CREATE_SESSION', [false, 'Create a new session on successful login.', true])
]
)
register_advanced_options(
[
OptBool.new('CreateSession', [false, 'Create a new session on successful login.', true]),
OptString.new('InitialAutoRunScript', "An initial script to run on session creation (before AutoRunScript)"),
OptString.new('AutoRunScript', "A script to run automatically on session creation."),
OptString.new('CommandShellCleanupCommand', "A command to run before the session is closed")

View File

@ -128,7 +128,7 @@ class MetasploitModule < Msf::Auxiliary
credential_core = create_credential(credential_data)
credential_data[:core] = credential_core
create_credential_login(credential_data)
if datastore['CREATE_SESSION']
if datastore['CreateSession']
session_setup(result, scanner)
end
:next_user

View File

@ -152,7 +152,7 @@ class MetasploitModule < Msf::Auxiliary
create_credential_login(credential_data)
tmp_key = result.credential.private
ssh_key = SSHKey.new tmp_key
if datastore['CREATE_SESSION']
if datastore['CreateSession']
session_setup(result, scanner, ssh_key.fingerprint)
end
:next_user

View File

@ -90,7 +90,7 @@ class MetasploitModule < Msf::Auxiliary
credential_data[:core] = credential_core
create_credential_login(credential_data)
print_good "#{ip}:#{rport} - Login Successful: #{result.credential}"
if datastore['CREATE_SESSION']
if datastore['CreateSession']
start_telnet_session(ip,rport,result.credential.public,result.credential.private,scanner)
end
else