Add verbosity flag (except for errors.)

git-svn-id: file:///home/svn/incoming/trunk@3530 4d416f70-5f16-0410-b530-b9f4589650da
unstable
vlad902 2006-02-18 17:12:25 +00:00
parent 8422da47dd
commit f2ab112647
1 changed files with 8 additions and 8 deletions

View File

@ -33,15 +33,15 @@ module Exploit::Remote::Ftp
# the RHOST and RPORT options, respectively. After connecting, the banner
# message is read in and stored in the 'banner' attribute.
#
def connect(global = true)
print_status("Connecting to FTP server #{rhost}:#{rport}...")
def connect(global = true, verbose = true)
print_status("Connecting to FTP server #{rhost}:#{rport}...") if verbose
fd = super
fd = super(global)
# Wait for a banner to arrive...
self.banner = fd.get_once
print_status("Connected to target FTP server.")
print_status("Connected to target FTP server.") if verbose
# Return the file descriptor to the caller
fd
@ -51,15 +51,15 @@ module Exploit::Remote::Ftp
# Connect and login to the remote FTP server using the credentials
# that have been supplied in the exploit options.
#
def connect_login(global = true)
ftpsock = connect(global)
def connect_login(global = true, verbose = true)
ftpsock = connect(global, verbose)
if (not (user and pass))
print_status("No username and password were supplied, unable to login")
return false
end
print_status("Authenticating as #{user} with password #{pass}...")
print_status("Authenticating as #{user} with password #{pass}...") if verbose
res = send_user(user, ftpsock)
if (res !~ /^(331|2)/)
@ -68,7 +68,7 @@ module Exploit::Remote::Ftp
end
if (pass)
print_status("Sending password...")
print_status("Sending password...") if verbose
res = send_pass(pass, ftpsock)
if (res !~ /^2/)
print_status("The server rejected our password")