Пример #1
0
        private void toFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            COMIPIDEntry ipid = GetSelectedIpid();

            if (ipid != null)
            {
                using (SaveFileDialog dlg = new SaveFileDialog())
                {
                    dlg.Filter = "All Files (*.*)|*.*";
                    if (dlg.ShowDialog(this) == DialogResult.OK)
                    {
                        try
                        {
                            File.WriteAllBytes(dlg.FileName, ipid.ToObjref());
                        }
                        catch (Exception ex)
                        {
                            EntryPoint.ShowError(this, ex);
                        }
                    }
                }
            }
        }
Пример #2
0
        private void SetupIPIDEntry(COMIPIDEntry obj)
        {
            textBoxIPID.Text                = obj.Ipid.FormatGuid();
            textBoxIPIDIID.Text             = obj.Iid.FormatGuid();
            textBoxIPIDIIDName.Text         = m_registry.MapIidToInterface(obj.Iid).Name;
            textBoxIPIDFlags.Text           = obj.Flags.ToString();
            textBoxIPIDInterface.Text       = String.Format("0x{0:X}", obj.Interface.ToInt64());
            textBoxIPIDInterfaceVTable.Text = GetStringValue(obj.InterfaceVTable);
            textBoxIPIDStub.Text            = String.Format("0x{0:X}", obj.Stub.ToInt64());
            textBoxIPIDStubVTable.Text      = GetStringValue(obj.StubVTable);
            textBoxIPIDOXID.Text            = obj.Oxid.FormatGuid();
            textBoxIPIDReferences.Text      = String.Format("Strong: {0}, Weak: {1}, Private: {2}",
                                                            obj.StrongRefs, obj.WeakRefs, obj.PrivateRefs);

            textBoxIPIDProcessId.Text = COMUtilities.GetProcessIdFromIPid(obj.Ipid).ToString();
            textBoxIPIDApartment.Text = COMUtilities.GetApartmentIdStringFromIPid(obj.Ipid);
            textBoxIPIDStaHwnd.Text   = String.Format("0x{0:X}", obj.ServerSTAHwnd.ToInt64());
            listViewIpidMethods.Items.AddRange(obj.Methods.Select((method, i) =>
            {
                ListViewItem item = new ListViewItem(i.ToString());
                item.SubItems.Add(method.Name);
                item.SubItems.Add(method.Address);
                item.SubItems.Add(method.Symbol);
                int count = method.Procedure != null ? method.Procedure.Params.Count : 0;
                if (i == 0)
                {
                    count = 3;
                }
                item.SubItems.Add(count.ToString());
                return(item);
            }
                                                                  ).ToArray());
            listViewIpidMethods.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
            listViewIpidMethods.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            m_ipid = obj;
            tabControlProperties.TabPages.Add(tabPageIPID);
        }
Пример #3
0
 internal void LoadIPid(Guid ipid)
 {
     try
     {
         ConfigureSymbols();
         var proc = COMUtilities.LoadProcesses(new int[] { COMUtilities.GetProcessIdFromIPid(ipid) }, this, m_registry).FirstOrDefault();
         if (proc != null)
         {
             COMIPIDEntry ipid_entry = proc.Ipids.Where(e => e.Ipid == ipid).FirstOrDefault();
             if (ipid_entry != null)
             {
                 HostControl(new PropertiesControl(m_registry, string.Format("IPID: {0}", ipid.FormatGuid()), ipid_entry));
             }
         }
         else
         {
             throw new Exception($"Couldn't load process for IPID: {ipid.FormatGuid()}");
         }
     }
     catch (Exception ex)
     {
         EntryPoint.ShowError(this, ex);
     }
 }
Пример #4
0
 public static BaseComWrapper Wrap(object obj, COMIPIDEntry ipid)
 {
     return(Wrap(obj, COMUtilities.GetInterfaceType(ipid)));
 }
 public static void Convert(COMIPIDEntry ipid, string output_path)
 {
     Convert(ipid.ToProxyInstance(), output_path);
 }