Move CREATE_SESSION option to advanced option CreateSession
parent
8a7187ad79
commit
eceb47a9da
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue