예제 #1
0
        private void ConnectButton_Click(object sender, EventArgs e)
        {
            // write to console
            CmdOutput.Invoke(new Action(() => CmdOutput.AppendText("Launching pipes...\r\n")));

            // save auth mode in application settings
            Properties.Settings.Default.authMode = authTabControl.SelectedTab.Name;

            // start service, authenticating to target machine as specified
            if (Properties.Settings.Default.authMode == "elevated")
            {
                paexecService.StartService(PAExecEXELocation.Text, TestComputer.Text, AdminUsername.Text,
                                           ElevatedAccountEXELocation.Text);
            }
            else
            {
                paexecService.StartService(PAExecEXELocation.Text, TestComputer.Text, AdminUsername.Text,
                                           userAuthTextbox.Text, passAuthTextbox.Text, ElevatedAccountEXELocation.Text);
            }

            // enable/disable buttons on gui
            KillButton.Enabled    = paexecService.IsRunning;
            ConnectButton.Enabled = !paexecService.IsRunning;
            ExecuteButton.Enabled = (CmdQueueListView.Items.Count > 0);
        }
예제 #2
0
 private void StringFromClientHandler(object o, string e)
 {
     if (e.StartsWith("echo **HEARTBEAT"))
     {
         // do not print to cmd
     }
     else
     {
         CmdOutput.Invoke(new Action(() => CmdOutput.AppendText(e.ToString())));
     }
 }
예제 #3
0
 private void KillButton_Click(object sender, EventArgs e)
 {
     // sends kill message to paexecService service
     paexecService.KillPipes();
     shouldSendCommands = false;
     CmdOutput.Invoke(new Action(() => CmdOutput.AppendText("\r\nKilling pipes...\r\n")));
     CmdOutput.Invoke(new Action(() => CmdOutput.AppendText("\r\nPipes killed.\r\n")));
     KillButton.Enabled    = false;
     ConnectButton.Enabled = true;
     ExecuteButton.Enabled = false;
 }