From d5e07a3ba9c4e9d846ca39e70cf6c89ce1241e44 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Fri, 26 Feb 2010 01:09:09 +0000 Subject: [PATCH] Change info git-svn-id: file:///home/svn/framework3/trunk@8650 4d416f70-5f16-0410-b530-b9f4589650da --- modules/auxiliary/scanner/ssh/ssh_login.rb | 1 + modules/auxiliary/scanner/telnet/telnet_login.rb | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/auxiliary/scanner/ssh/ssh_login.rb b/modules/auxiliary/scanner/ssh/ssh_login.rb index bb4cbf01d1..56d4d13e7b 100644 --- a/modules/auxiliary/scanner/ssh/ssh_login.rb +++ b/modules/auxiliary/scanner/ssh/ssh_login.rb @@ -100,6 +100,7 @@ class Metasploit3 < Msf::Auxiliary conn = Net::SSH::CommandStream.new(self.ssh_socket, '/bin/sh', true) sess = Msf::Sessions::CommandShell.new(conn.lsock) sess.set_from_exploit(self) + sess.info = "SSH #{user}:#{pass} (#{ip}:#{port})" framework.sessions.register(sess) return [:success, proof] diff --git a/modules/auxiliary/scanner/telnet/telnet_login.rb b/modules/auxiliary/scanner/telnet/telnet_login.rb index 0661e5c835..b0a170b330 100644 --- a/modules/auxiliary/scanner/telnet/telnet_login.rb +++ b/modules/auxiliary/scanner/telnet/telnet_login.rb @@ -96,7 +96,7 @@ class Metasploit3 < Msf::Auxiliary print_status "#{rhost}:#{rport} Telnet - Skipping '#{user}':'#{pass}' due to missing password prompt" if datastore['VERBOSE'] self.no_pass_prompt << this_cred else - start_telnet_session if login_succeeded? + start_telnet_session(rhost,rport,user,pass) if login_succeeded? end end @@ -188,12 +188,13 @@ class Metasploit3 < Msf::Auxiliary ) end - def start_telnet_session + def start_telnet_session(host,port,user,pass) # Windows telnet server requires \r\n line endings and it doesn't # seem to affect anything else. sock.extend(CRLFLineEndings) sess = Msf::Sessions::CommandShell.new(sock) sess.set_from_exploit(self) + sess.info = "TELNET #{user}:#{pass} (#{host}:#{port})" framework.sessions.register(sess) end