/// <summary>
        /// PASSWORD.
        /// </summary>
        /// <remarks>
        /// The argument field is a Telnet string specifying the user's
        /// password.  This command must be immediately preceded by the
        /// user name command, and, for some sites, completes the user's
        /// identification for access control.  Since password
        /// information is quite sensitive, it is desirable in general
        /// to "mask" it or suppress typeout.  It appears that the
        /// server has no foolproof way to achieve this.  It is
        /// therefore the responsibility of the user-FTP process to hide
        /// the sensitive password information.
        /// </remarks>
        void PASS(string password)
        {
            FtpLoginEventArgs e = new FtpLoginEventArgs(this, UserName, password);

            Server.OnCheckLogin(e);
            if (e.Denied)
            {
                SendAnswer("530 invalid username or password.");
            }
            else
            {
                LoggedIn = true;
                SendAnswer("230 Logged in.");
            }
        }
Exemplo n.º 2
0
 /// <summary>Raises the <see cref="E:CheckAccess" /> event.</summary>
 /// <param name="e">The <see cref="FtpLoginEventArgs"/> instance containing the event data.</param>
 protected internal virtual void OnCheckLogin(FtpLoginEventArgs e)
 {
     CheckLogin?.Invoke(this, e);
 }