Ejemplo n.º 1
0
        public static IDumper GetDumper(uint processId, DumperType dumperType)
        {
            switch (dumperType)
            {
            case DumperType.Normal: return(NormalDumper.Create(processId));

            default: throw new ArgumentOutOfRangeException(nameof(dumperType));
            }
        }
Ejemplo n.º 2
0
        private void SwitchDumperType(DumperType dumperType)
        {
            string name = dumperType.ToString();

            foreach (ToolStripMenuItem item in mnuDumperType.DropDownItems)
            {
                item.Checked = item.Text == name;
            }
            _dumperType = dumperType;
        }
Ejemplo n.º 3
0
        public static IDumper GetDumper(uint processId, DumperType dumperType)
        {
            switch (dumperType)
            {
            case DumperType.MegaDumper:
                return(MegaDumper.Create(processId));

            case DumperType.AntiAntiDumper:
                return(AntiAntiDumper.Create(processId));

            default:
                throw new InvalidEnumArgumentException();
            }
        }
Ejemplo n.º 4
0
        private void SwitchDumperType(DumperType dumperType)
        {
            mnuUseMegaDumper.Checked     = false;
            mnuUseAntiAntiDumper.Checked = false;
            switch (dumperType)
            {
            case DumperType.MegaDumper:
                _dumperType.Value        = DumperType.MegaDumper;
                mnuUseMegaDumper.Checked = true;
                break;

            case DumperType.AntiAntiDumper:
                _dumperType.Value            = DumperType.AntiAntiDumper;
                mnuUseAntiAntiDumper.Checked = true;
                break;

            default:
                throw new InvalidEnumArgumentException();
            }
        }
Ejemplo n.º 5
0
 public ModulesForm(ProcessInfo processInfo, DumperType dumperType)
 {
     InitializeComponent();
     _processInfo = processInfo;
     _process     = NativeProcess.Open(processInfo.Id);
     if (_process == NativeProcess.InvalidProcess)
     {
         throw new InvalidOperationException();
     }
     _dumperType = dumperType;
     Text        = $"{_resources.GetString("StrModules")} {processInfo.ModuleName}(ID={processInfo.Id})";
     typeof(ListView).InvokeMember("DoubleBuffered", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetProperty, null, lvwModules, new object[] { true });
     lvwModules.ListViewItemSorter = new ListViewItemSorter(lvwModules, new List <TypeCode> {
         TypeCode.String, TypeCode.String, TypeCode.String, TypeCode.UInt64, TypeCode.Int32, TypeCode.String
     })
     {
         AllowHexLeading = true
     };
     RefreshModuleList();
 }
Ejemplo n.º 6
0
        public ProcessesForm()
        {
            InitializeComponent();
            Text = $"{Application.ProductName} v{Application.ProductVersion} ({(Environment.Is64BitProcess ? "x64" : "x86")}{(_isAdministrator ? _resources.GetString("StrAdministrator") : string.Empty)})";
            typeof(ListView).InvokeMember("DoubleBuffered", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetProperty, null, lvwProcesses, new object[] { true });
            lvwProcesses.ListViewItemSorter = new ListViewItemSorter(lvwProcesses, new List <TypeCode> {
                TypeCode.String,
                TypeCode.Int32,
                TypeCode.String
            });
            for (DumperType dumperType = DumperType.Normal; dumperType <= DumperType.AntiAntiDump; dumperType++)
            {
                ToolStripMenuItem item;
                DumperType        currentDumperType;

                item = new ToolStripMenuItem(dumperType.ToString());
                currentDumperType = dumperType;
                item.Click       += (object sender, EventArgs e) => SwitchDumperType(currentDumperType);
                mnuDumperType.DropDownItems.Add(item);
            }
            SwitchDumperType(DumperType.Normal);
            RefreshProcessList();
        }