-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.cs
86 lines (77 loc) · 2.79 KB
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Windows.Forms;
using System.Diagnostics;
namespace De4dot_GUI
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
guna2ComboBox1.Items.Add("x32");
guna2ComboBox1.Items.Add("x64");
guna2ComboBox1.SelectedIndex = 1;
}
private void guna2Button1_Click(object sender, EventArgs e)
{
OpenFileDialog opf = new OpenFileDialog();
opf.Filter = "Exe Files (*.exe)|*.exe";
opf.Multiselect = false;
if (opf.ShowDialog() == DialogResult.OK)
{
guna2TextBox1.Text = opf.FileName;
}
}
private void guna2Button2_Click(object sender, EventArgs e)
{
if (guna2ComboBox1.SelectedIndex == 0)
{
ProcessStartInfo psi = new ProcessStartInfo();
psi.UseShellExecute = false;
psi.CreateNoWindow = true;
psi.WindowStyle = ProcessWindowStyle.Hidden;
psi.FileName = "cmd.exe";
psi.Arguments = $"/c de4dot.exe {guna2TextBox1.Text}";
psi.RedirectStandardOutput = true;
Process process = new Process();
process.StartInfo = psi;
process.Start();
string logbox = process.StandardOutput.ReadToEnd();
process.WaitForExit();
guna2TextBox2.Clear();
guna2TextBox2.Text = logbox;
process.Dispose();
}
else
{
ProcessStartInfo psi = new ProcessStartInfo();
psi.UseShellExecute = false;
psi.CreateNoWindow = true;
psi.WindowStyle = ProcessWindowStyle.Hidden;
psi.FileName = "cmd.exe";
psi.Arguments = $"/c de4dot-x64.exe {guna2TextBox1.Text}";
psi.RedirectStandardOutput = true;
Process process = new Process();
process.StartInfo = psi;
process.Start();
string logbox = process.StandardOutput.ReadToEnd();
process.WaitForExit();
guna2TextBox2.Clear();
guna2TextBox2.Text = logbox;
process.Dispose();
}
}
private void Form1_Load(object sender, EventArgs e)
{
MessageBox.Show("De4dot gui by Keevo\nDiscord: j.r7\nGithub: https://github.com/keevodev");
}
}
}