예제 #1
0
        private void buttonStruct_Click(object sender, EventArgs e)
        {
            int selectionStart = (int)hexBoxMemory.SelectionStart;

            List <string> structNames = new List <string>(Program.Structs.Keys);

            structNames.Sort();

            ListPickerWindow lpw = new ListPickerWindow(structNames.ToArray());

            lpw.Text = "Select a Struct";

            if (lpw.ShowDialog() == DialogResult.OK)
            {
                if (Program.Structs.ContainsKey(lpw.SelectedItem))
                {
                    // stupid TreeViewAdv only works on the one thread
                    Program.HackerWindow.BeginInvoke(new MethodInvoker(delegate
                    {
                        StructWindow sw = new StructWindow(_pid, (_address.Increment(selectionStart)),
                                                           Program.Structs[lpw.SelectedItem]);

                        try
                        {
                            sw.Show();
                            sw.Activate();
                        }
                        catch
                        { }
                    }));
                }
            }
        }
예제 #2
0
        private void buttonInspectPEB_Click(object sender, EventArgs e)
        {
            try
            { 
                if (!Program.Structs.ContainsKey("PEB"))
                    throw new Exception("The struct 'PEB' has not been loaded. Make sure structs.txt was loaded successfully.");

                using (ProcessHandle phandle = new ProcessHandle(_pid, Program.MinProcessQueryRights))
                {
                    IntPtr baseAddress = phandle.GetBasicInformation().PebBaseAddress;

                    Program.HackerWindow.BeginInvoke(new MethodInvoker(() =>
                    {
                        StructWindow sw = new StructWindow(_pid, baseAddress, Program.Structs["PEB"]);

                        try
                        {
                            sw.Show();
                            sw.Activate();
                        }
                        catch
                        { }
                    }));
                }
            }
            catch (Exception ex)
            {
                PhUtils.ShowException("Unable to inspect the PEB", ex);
            }
        }
예제 #3
0
        private void buttonStruct_Click(object sender, EventArgs e)
        {
            int selectionStart = (int)hexBoxMemory.SelectionStart;

            List<string> structNames = new List<string>(Program.Structs.Keys);

            structNames.Sort();

            ListPickerWindow lpw = new ListPickerWindow(structNames.ToArray());

            lpw.Text = "Select a Struct";

            if (lpw.ShowDialog() == DialogResult.OK)
            {
                if (Program.Structs.ContainsKey(lpw.SelectedItem))
                {
                    // stupid TreeViewAdv only works on the one thread
                    Program.HackerWindow.BeginInvoke(new MethodInvoker(delegate
                        {
                            StructWindow sw = new StructWindow(_pid, (_address.Increment(selectionStart)),
                                Program.Structs[lpw.SelectedItem]);

                            try
                            {
                                sw.Show();
                                sw.Activate();
                            }
                            catch
                            { }
                        }));
                }
            }
        }