Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                SharedConfig.SharedConfig config = new SharedConfig.SharedConfig();

                Byte[] submittedPassBytes;
                Byte[] encodedBytes;
                MD5    md5;
                string amereSalt = "0ç__è-(''\"'-°\"Bhj5s9867";
                md5 = new MD5CryptoServiceProvider();
                submittedPassBytes = ASCIIEncoding.Default.GetBytes(amereSalt + this._pwTextBox.Text);
                encodedBytes       = md5.ComputeHash(submittedPassBytes);
                string hash = BitConverter.ToString(encodedBytes);
                if (hash == config.AdminPwdHash)
                {
                    _badPasslabel.Text = "";
                    Response.Redirect("adminmain.aspx");
                }
                else
                {
                    _badPasslabel.Text = "Wrong Password.";
                }
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _badPass.Visible = false;
            if (IsPostBack)
            {
                SharedConfig.SharedConfig config = new SharedConfig.SharedConfig();

                Byte[] submittedPassBytes;
                Byte[] encodedBytes;
                MD5    md5;
                string amereSalt = "0ç__è-(''\"'-°\"Bhj5s9867";
                md5 = new MD5CryptoServiceProvider();
                submittedPassBytes = ASCIIEncoding.Default.GetBytes(amereSalt + this._oldpassTextBox.Text);
                encodedBytes       = md5.ComputeHash(submittedPassBytes);
                string hash = BitConverter.ToString(encodedBytes);
                if (hash == config.AdminPwdHash)
                {
                    submittedPassBytes = ASCIIEncoding.Default.GetBytes(amereSalt + this._newPassBisTextBox.Text);
                    encodedBytes       = md5.ComputeHash(submittedPassBytes);
                    hash = BitConverter.ToString(encodedBytes);

                    config.PropertyValues["AdminPwdHash"].PropertyValue    = hash;
                    config.PropertyValues["LastUpdatedDate"].PropertyValue = DateTime.Now;
                    config.PropertyValues["LastUpdatedFrom"].PropertyValue = "Here";
                    config.Save();
                    _badPass.Visible = false;
                    Session.Abandon();
                }
                else
                {
                    _badPass.Visible = true;
                }
            }
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            
            if (IsPostBack)
            {
                  SharedConfig.SharedConfig config = new SharedConfig.SharedConfig();
                
                  Byte[] submittedPassBytes;
                  Byte[] encodedBytes;
                  MD5 md5;
                  string amereSalt = "0ç__è-(''\"'-°\"Bhj5s9867";
                  md5 = new MD5CryptoServiceProvider();
                  submittedPassBytes = ASCIIEncoding.Default.GetBytes(amereSalt + this._pwTextBox.Text);
                  encodedBytes = md5.ComputeHash(submittedPassBytes);
                  string hash = BitConverter.ToString(encodedBytes);
                  if (hash == config.AdminPwdHash)
                  {
                      _badPasslabel.Text = "";
                      Response.Redirect("adminmain.aspx");
                  }
                  else
                      _badPasslabel.Text = "Wrong Password.";                  
            }


        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _badPass.Visible = false;
            if (IsPostBack)
            {
                SharedConfig.SharedConfig config = new SharedConfig.SharedConfig();
               
                Byte[] submittedPassBytes;
                Byte[] encodedBytes;
                MD5 md5;
                string amereSalt = "0ç__è-(''\"'-°\"Bhj5s9867";
                md5 = new MD5CryptoServiceProvider();
                submittedPassBytes = ASCIIEncoding.Default.GetBytes(amereSalt + this._oldpassTextBox.Text);
                encodedBytes = md5.ComputeHash(submittedPassBytes);
                string hash = BitConverter.ToString(encodedBytes);
                if (hash == config.AdminPwdHash)
                {
                    submittedPassBytes = ASCIIEncoding.Default.GetBytes(amereSalt + this._newPassBisTextBox.Text);
                    encodedBytes = md5.ComputeHash(submittedPassBytes);
                    hash = BitConverter.ToString(encodedBytes);
                    
                    config.PropertyValues["AdminPwdHash"].PropertyValue = hash;
                    config.PropertyValues["LastUpdatedDate"].PropertyValue = DateTime.Now;
                    config.PropertyValues["LastUpdatedFrom"].PropertyValue = "Here";
                    config.Save(); 
                    _badPass.Visible = false;
                    Session.Abandon();
                    
                }
                else
                    _badPass.Visible = true;
            }

        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                SharedConfig.SharedConfig config = new SharedConfig.SharedConfig();
                config.PropertyValues["MppsPort"].PropertyValue = _MppsAETTextBox.Text;
                config.PropertyValues["MppsPort"].PropertyValue = Int32.Parse(_MppsListeningPort.Text);
                config.PropertyValues["LastUpdatedDate"].PropertyValue = DateTime.Now;
                config.PropertyValues["LastUpdatedFrom"].PropertyValue = "Here";
                config.Save();
                Label3.Visible = true;
                
            }
            else
                Label3.Visible = false;

        }
Example #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack)
     {
         SharedConfig.SharedConfig config = new SharedConfig.SharedConfig();
         config.PropertyValues["MppsPort"].PropertyValue        = _MppsAETTextBox.Text;
         config.PropertyValues["MppsPort"].PropertyValue        = Int32.Parse(_MppsListeningPort.Text);
         config.PropertyValues["LastUpdatedDate"].PropertyValue = DateTime.Now;
         config.PropertyValues["LastUpdatedFrom"].PropertyValue = "Here";
         config.Save();
         Label3.Visible = true;
     }
     else
     {
         Label3.Visible = false;
     }
 }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                SharedConfig.SharedConfig config = new SharedConfig.SharedConfig();
                config.PropertyValues["MwlAETitle"].PropertyValue                = _MwlAETTextBox.Text;
                config.PropertyValues["MwlPort"].PropertyValue                   = Int32.Parse(_MwlListeningPort.Text);
                config.PropertyValues["MWLMaxResponsesToSend"].PropertyValue     = Int32.Parse(_maxResponsesTextBox.Text);
                config.PropertyValues["MWLResponseBufferCapacity"].PropertyValue = Int32.Parse(_bufferCapacityTextBox.Text);
                config.PropertyValues["LastUpdatedDate"].PropertyValue           = DateTime.Now;
                config.PropertyValues["LastUpdatedFrom"].PropertyValue           = "Here";

                config.Save();
                Label3.Visible = true;
            }
            else
            {
                Label3.Visible = false;
            }
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                SharedConfig.SharedConfig config = new SharedConfig.SharedConfig();
                config.PropertyValues["MwlAETitle"].PropertyValue = _MwlAETTextBox.Text;
                config.PropertyValues["MwlPort"].PropertyValue = Int32.Parse(_MwlListeningPort.Text);
                config.PropertyValues["MWLMaxResponsesToSend"].PropertyValue = Int32.Parse(_maxResponsesTextBox.Text);
                config.PropertyValues["MWLResponseBufferCapacity"].PropertyValue = Int32.Parse(_bufferCapacityTextBox.Text);
                config.PropertyValues["LastUpdatedDate"].PropertyValue = DateTime.Now;
                config.PropertyValues["LastUpdatedFrom"].PropertyValue = "Here";
                
                config.Save();
                Label3.Visible = true;

            }
            else
                Label3.Visible = false;


        }