Пример #1
0
        public static void Add(ObData p)
        {
            DataRow dr = CurrentData.Tables[0].NewRow();

            dr[Col_Kind]           = p.Kind;
            dr[Col_InitialName]    = p.InitialName;
            dr[Col_ObfuscatedName] = p._ObfuscatedName;
            dr[Col_Notes]          = p.Notes;
            CurrentData.Tables[0].Rows.Add(dr);
        }
Пример #2
0
        private void toolStripMenuItemSave_Click(object sender, EventArgs e)
        {
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.DefaultExt = ".xml";
            sfd.Filter     = "xml文件|*.xml";
            if (sfd.ShowDialog() == DialogResult.OK)
            {
                ObData.Save(sfd.FileName);
            }
        }
Пример #3
0
        void DecompileMe_NameObfuscated(DecompileMe.Obfuscation2.ObfuscationItem item, string initialName, string obfuscatedName, string notes)
        {
            ObData oda = new ObData();

            oda.Kind           = item.ToString();
            oda.InitialName    = initialName;
            oda.ObfuscatedName = obfuscatedName;
            oda.Notes          = notes;
            ObData.Add(oda);
            ListViewItem lvItem = gridOutputMapping.Items.Add(item.ToString());

            lvItem.SubItems.Add(initialName);
            lvItem.SubItems.Add(obfuscatedName);
            lvItem.SubItems.Add(notes);
        }
Пример #4
0
        private void btnGenerate_Click(object sender, EventArgs e)
        {
            ObData.Clear();
            saveToolStripMenuItem_Click(sender, e);
            int ExeCount = CheckHaveMoreExe();

            if (ExeCount > 1)
            {
                MessageBox.Show("more than one exe file exists,please select only one exe file.");
                return;
            }
            if (ExeCount == 0 && chkObEncriptAssembly.Checked)
            {
                MessageBox.Show("you have choice the encript methods,so please select a exe file.");
                return;
            }

            DecompileMeManager DecompileMe = new DecompileMeManager(txtBuildPath.Text,
                                                                    chkObfuscateTypes.Checked,
                                                                    chkObfuscateMethods.Checked,
                                                                    chkObEncriptAssembly.Checked,
                                                                    chkObfuscateNamespaces.Checked,
                                                                    chkObfuscateProperties.Checked,
                                                                    chkObfuscateFields.Checked);

            string exefile = GetExeFile();

            AssInfo.ExeFileName = exefile;

            // Add assemblies
            foreach (TreeNode node in tvAssemblies.Nodes[0].Nodes)
            {
                string sExcludes = string.Empty;
                ScanNotInclude(node, ref sExcludes);
                DecompileMe.AddAssembly(GeNodetAsemblyName(node.Text), node.Checked);

                // Exclusions

                if (sExcludes != string.Empty)
                {
                    string[] sExTypes = sExcludes.Split('*');
                    foreach (string str in sExTypes)
                    {
                        DecompileMe.ExcludeType(str);
                    }
                }
            }

            DecompileMe.OutputEvent += new DecompileMeOutputEvent(DecompileMe_OutputEvent);
            DecompileMe.RequestReferencedAssemblyPath += new DecompileMeRequestReferencedAssemblyPath(DecompileMe_RequestReferencedAssemblyPath);
            DecompileMe.NameObfuscated += new DecompileMeNameObfuscated(DecompileMe_NameObfuscated);
            DecompileMe.Progress       += new DecompileMeProgress(DecompileMe_Progress);
            if (chkObEncriptAssembly.Checked)
            {
                DecompileMe.AllComplated += new EventHandler(DecompileMe_AllComplated1);
            }
            else
            {
                DecompileMe.AllComplated += new EventHandler(DecompileMe_AllComplated2);
            }
            DecompileMe.StartObfuscation();

            tabControl1.SelectedIndex = 3;
        }