private void DumpProcessWindow_Load(object sender, EventArgs e)
        {
            this.LoadProperties();

            _tokenProps = new TokenProperties(null)
            {
                Dock = DockStyle.Fill
            };
            tabToken.Controls.Add(_tokenProps);
            _tokenProps.DumpInitialize();
            this.LoadToken();

            // Modules
            if (_item.FileName != null)
                listModules.DumpSetMainModule(_item.FileName);
            listModules.List.AddShortcuts();
            listModules.List.ContextMenu = listModules.List.GetCopyMenu();

            this.LoadModules();
            listModules.UpdateItems();

            // Environment
            listEnvironment.AddShortcuts();
            listEnvironment.ContextMenu = listEnvironment.GetCopyMenu();

            this.LoadEnvironment();

            // Handles
            listHandles.DumpDisableEvents();
            listHandles.List.AddShortcuts();
            listHandles.List.ContextMenu = listHandles.List.GetCopyMenu();

            this.LoadHandles();
            listHandles.UpdateItems();
        }
Esempio n. 2
0
        public TokenWindow(IWithToken obj)
        {
            InitializeComponent();
            this.AddEscapeToClose();
            this.SetTopMost();

            _tokenProps = new TokenProperties(obj);
            _tokenProps.Dock = DockStyle.Fill;

            panelToken.Controls.Add(_tokenProps);
        }
        private void InitializeSubControls()
        {
            var processStats = new ProcessStatistics(_pid);
            processStats.Dock = DockStyle.Fill;
            tabStatistics.Controls.Add(processStats);
            _processStats = processStats;

            // If this is a non-process, we need to clear the statistics first.
            if (_pid <= 0)
                _processStats.ClearStatistics();

            try
            {
                _tokenProps = new TokenProperties(new ProcessHandle(_pid, Program.MinProcessQueryRights));
                _tokenProps.Dock = DockStyle.Fill;
                tabToken.Controls.Add(_tokenProps);
            }
            catch
            { }

            try
            {
                using (var phandle = new ProcessHandle(_pid, Program.MinProcessQueryRights))
                {
                    var jhandle = phandle.GetJobObject(JobObjectAccess.Query);

                    if (jhandle != null)
                    {
                        using (jhandle)
                        {
                            _jobProps = new JobProperties(jhandle);
                            _jobProps.Dock = DockStyle.Fill;
                            tabJob.Controls.Add(_jobProps);
                        }
                    }
                }
            }
            catch
            { }

            if (Program.HackerWindow != null)
            {
                if (Program.HackerWindow.ProcessServices.ContainsKey(_pid))
                {
                    if (Program.HackerWindow.ProcessServices[_pid].Count > 0)
                    {
                        _serviceProps = new ServiceProperties(
                           Program.HackerWindow.ProcessServices.ContainsKey(_pid) ?
                           Program.HackerWindow.ProcessServices[_pid].ToArray() :
                           new string[0]);
                        _serviceProps.Dock = DockStyle.Fill;
                        _serviceProps.PID = _pid;
                        tabServices.Controls.Add(_serviceProps);
                    }
                }
            }

            if (_processItem.IsDotNet)
            {
                try
                {
                    _dotNetCounters = new DotNetCounters(_pid, _processItem.Name);
                    _dotNetCounters.Dock = DockStyle.Fill;
                    tabDotNet.Controls.Add(_dotNetCounters);
                }
                catch
                { }
            }

            listEnvironment.ListViewItemSorter = new SortedListViewComparer(listEnvironment);
            listEnvironment.ContextMenu = listEnvironment.GetCopyMenu();
            ColumnSettings.LoadSettings(Settings.Instance.EnvironmentListViewColumns, listEnvironment);
        }
Esempio n. 4
0
        private void InitializeSubControls()
        {
            var processStats = new ProcessStatistics(_pid);
            processStats.Dock = DockStyle.Fill;
            tabStatistics.Controls.Add(processStats);
            _processStats = processStats;

            if (_pid <= 0)
                _processStats.ClearStatistics();

            try
            {
                _tokenProps = new TokenProperties(new ProcessHandle(_pid, Program.MinProcessQueryRights));
                _tokenProps.Dock = DockStyle.Fill;
                tabToken.Controls.Add(_tokenProps);
            }
            catch
            { }

            try
            {
                using (var phandle = new ProcessHandle(_pid, Program.MinProcessQueryRights))
                {
                    var jhandle = phandle.GetJobObject(JobObjectAccess.Query);

                    if (jhandle != null)
                    {
                        using (jhandle)
                        {
                            _jobProps = new JobProperties(jhandle);
                            _jobProps.Dock = DockStyle.Fill;
                            tabJob.Controls.Add(_jobProps);
                        }
                    }
                }
            }
            catch
            { }

            if (Program.HackerWindow != null)
            {
                if (Program.HackerWindow.ProcessServices.ContainsKey(_pid))
                {
                    if (Program.HackerWindow.ProcessServices[_pid].Count > 0)
                    {
                        _serviceProps = new ServiceProperties(
                           Program.HackerWindow.ProcessServices.ContainsKey(_pid) ?
                           Program.HackerWindow.ProcessServices[_pid].ToArray() :
                           new string[0]);
                        _serviceProps.Dock = DockStyle.Fill;
                        _serviceProps.PID = _pid;
                        tabServices.Controls.Add(_serviceProps);
                    }
                }
            }

            listEnvironment.ListViewItemSorter = new SortedListViewComparer(listEnvironment);
            listEnvironment.SetDoubleBuffered(true);
            listEnvironment.SetTheme("explorer");
            listEnvironment.ContextMenu = listEnvironment.GetCopyMenu();
            ColumnSettings.LoadSettings(Properties.Settings.Default.EnvironmentListViewColumns, listEnvironment);
        }