Example #1
0
        private void btnDecodeLocal_Click(object sender, EventArgs e)
        {
            try
            {
                using (var secret = new LSASecret("$MACHINE.ACC"))
                {
                    secret.GetSecret(out byte[] bytes);

                    txtKey.Text = Convert.ToBase64String(bytes);
                }

                chkEncodedKey.Checked = true;

                button1_Click(sender, e);
            }
            catch (Exception ex)
            {
                ShowError(ex);
            }
        }
Example #2
0
        private void btnDecodeLocal_Click(object sender, EventArgs e)
        {
            try
            {
                RequestLocalTicket();

                txtHost.Text = Environment.MachineName.ToLowerInvariant();

                using (var secret = new LSASecret("$MACHINE.ACC"))
                {
                    secret.GetSecret(out byte[] bytes);

                    txtKey.Text = Convert.ToBase64String(bytes);
                }

                chkEncodedKey.Checked = true;

                button1_Click(sender, e);
            }
            catch (Exception ex)
            {
                ShowError(ex);
            }
        }