Ejemplo n.º 1
0
 private void btnOpenLogFile_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(_logFile) && File.Exists(_logFile))
     {
         SimpleProcess.Start(_logFile);
     }
 }
Ejemplo n.º 2
0
        public override PluginReturns Run(PluginArgument arg)
        {
            try
            {
                if (!SelectRootDirectory(arg.Host, false))
                {
                    if (SimpleMessage.Confirm("Failed to locate de4dot! Do you want to download now?") == System.Windows.Forms.DialogResult.Yes)
                    {
                        SimpleProcess.Start("https://bitbucket.org/0xd4d/de4dot/downloads");
                    }
                    return(PluginReturns.None);
                }

                var frm = new frmDe4dot(arg.Host, arg.Rows, arg.SourceDir);
                frm.ShowDialog();
                return(PluginReturns.Refresh);
            }
            catch
            {
                throw;
            }
            finally
            {
            }
        }
        private void dgvData_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex < 0 || e.RowIndex < 0)
            {
                return;
            }
            try
            {
                switch (dgvData.Columns[e.ColumnIndex].Name)
                {
                case "dgcContact":
                    string email = dgvData.Rows[e.RowIndex].Cells[e.ColumnIndex].Value as string;
                    if (!String.IsNullOrEmpty(email))
                    {
                        SimpleProcess.Start(String.Format("mailto:{0}", email));
                    }
                    break;

                default:
                    string url = dgvData.Rows[e.RowIndex].Cells["dgcUrl"].Value as string;
                    if (!String.IsNullOrEmpty(url))
                    {
                        SimpleProcess.Start(url);
                    }

                    break;
                }
            }
            catch (Exception ex)
            {
                SimpleMessage.ShowException(ex);
            }
        }
Ejemplo n.º 4
0
        public override PluginReturns Run(PluginArgument arg)
        {
            if (arg.Rows == null || arg.Rows.Length < 1)
            {
                SimpleMessage.ShowInfo("Please select file to open with Reflector.");
                return(PluginReturns.None);
            }

            try
            {
                if (!this.SelectReflector(arg.Host, false))
                {
                    if (SimpleMessage.Confirm("Failed to locate .Net Reflector! Do you want to download now?") == System.Windows.Forms.DialogResult.Yes)
                    {
                        SimpleProcess.Start("http://www.reflector.net/");
                    }
                    return(PluginReturns.None);
                }

                string path = GetReflector(arg.Host);

                try
                {
                    if (!RemoteController.Available)
                    {
                        Process p = new Process();
                        p.StartInfo.FileName         = path;
                        p.StartInfo.WorkingDirectory = Path.GetDirectoryName(path);
                        p.Start();
                    }

                    int count = 0;
                    while (!RemoteController.Available && count < 60)
                    {
                        Thread.Sleep(500);
                        count++;
                    }

                    if (RemoteController.Available)
                    {
                        for (int i = 0; i < arg.Rows.Length; i++)
                        {
                            RemoteController.LoadAssembly(Path.Combine(arg.SourceDir, arg.Rows[i]));
                        }
                    }
                }
                catch (Exception ex)
                {
                    SimpleMessage.ShowException(ex);
                }
            }
            catch
            {
                throw;
            }

            return(PluginReturns.None);
        }
Ejemplo n.º 5
0
 private void btnReport_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(_reportUrl))
     {
         SimpleDotNet.SendEmail(GetSubject(), txtInfo.Text);
     }
     else
     {
         SimpleProcess.Start(_reportUrl);
     }
 }
Ejemplo n.º 6
0
 private void lblLog_Click(object sender, EventArgs e)
 {
     if (_rows.Length == 1)
     {
         string outputFile = GetLogFileName(_rows[0]);
         if (File.Exists(outputFile))
         {
             SimpleProcess.Start(outputFile);
         }
     }
     else if (_rows.Length > 1)
     {
         string outputDir = _sourceDir;
         if (Directory.Exists(outputDir))
         {
             SimpleProcess.Start(outputDir);
         }
     }
 }
 private void lblRandom_Click(object sender, EventArgs e)
 {
     SimpleProcess.Start("notepad.exe", RandomFile.Default.FileName);
 }
 private void lblIgnoredTypeFile_Click(object sender, EventArgs e)
 {
     SimpleProcess.Start("notepad.exe", IgnoredTypeFile.Default.FileName);
 }
 private void lblRemoveAttribute_Click(object sender, EventArgs e)
 {
     SimpleProcess.Start("notepad.exe", AttributeFile.Default.FileName);
 }
 private void lblStringOption_Click(object sender, EventArgs e)
 {
     SimpleProcess.Start("notepad.exe", IgnoredMethodFile.Default.FileName);
 }
 private void lblRemoveExceptionHandler_Click(object sender, EventArgs e)
 {
     SimpleProcess.Start("notepad.exe", ExceptionHandlerFile.Default.FileName);
 }
 private void lblPatternFile_Click(object sender, EventArgs e)
 {
     SimpleProcess.Start("notepad.exe", PatternFile.Default.FileName);
 }