当前位置: 首页>>代码示例>>C#>>正文


C# IDeobfuscator.detect方法代码示例

本文整理汇总了C#中IDeobfuscator.detect方法的典型用法代码示例。如果您正苦于以下问题:C# IDeobfuscator.detect方法的具体用法?C# IDeobfuscator.detect怎么用?C# IDeobfuscator.detect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDeobfuscator的用法示例。


在下文中一共展示了IDeobfuscator.detect方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: detectObfuscator

        void detectObfuscator(IEnumerable<IDeobfuscator> deobfuscators)
        {
            // The deobfuscators may call methods to deobfuscate control flow and decrypt
            // strings (statically) in order to detect the obfuscator.
            if (!options.ControlFlowDeobfuscation || options.StringDecrypterType == DecrypterType.None)
                savedMethodBodies = new SavedMethodBodies();

            // It's not null if it unpacked a native file
            if (this.deob != null) {
                deob.init(module);
                deob.DeobfuscatedFile = this;
                deob.earlyDetect();
                deob.detect();
                return;
            }

            foreach (var deob in deobfuscators) {
                deob.init(module);
                deob.DeobfuscatedFile = this;
            }

            if (options.ForcedObfuscatorType != null) {
                foreach (var deob in deobfuscators) {
                    if (string.Equals(options.ForcedObfuscatorType, deob.Type, StringComparison.OrdinalIgnoreCase)) {
                        deob.earlyDetect();
                        this.deob = deob;
                        deob.detect();
                        return;
                    }
                }
            }
            else {
                this.deob = earlyDetectObfuscator(deobfuscators);
                if (this.deob == null)
                    this.deob = detectObfuscator2(deobfuscators);
                else
                    this.deob.detect();
            }
        }
开发者ID:huliang,项目名称:de4dot,代码行数:39,代码来源:ObfuscatedFile.cs

示例2: detectObfuscator2

        IDeobfuscator detectObfuscator2(IEnumerable<IDeobfuscator> deobfuscators)
        {
            var allDetected = new List<IDeobfuscator>();
            IDeobfuscator detected = null;
            int detectVal = 0;
            foreach (var deob in deobfuscators) {
                this.deob = deob;	// So we can call deob.CanInlineMethods in deobfuscate()
                int val = deob.detect();
                Log.v("{0,3}: {1}", val, deob.TypeLong);
                if (val > 0 && deob.Type != "un")
                    allDetected.Add(deob);
                if (val > detectVal) {
                    detectVal = val;
                    detected = deob;
                }
            }
            this.deob = null;

            if (allDetected.Count > 1) {
                Log.n("More than one obfuscator detected:");
                Log.indent();
                foreach (var deob in allDetected)
                    Log.n("{0} (use: -p {1})", deob.Name, deob.Type);
                Log.deIndent();
            }

            return detected;
        }
开发者ID:huliang,项目名称:de4dot,代码行数:28,代码来源:ObfuscatedFile.cs

示例3: detectObfuscator2

 IDeobfuscator detectObfuscator2(IEnumerable<IDeobfuscator> deobfuscators)
 {
     IDeobfuscator detected = null;
     int detectVal = 0;
     foreach (var deob in deobfuscators) {
         this.deob = deob;	// So we can call deob.CanInlineMethods in deobfuscate()
         int val = deob.detect();
         Log.v("{0,3}: {1}", val, deob.TypeLong);
         if (val > detectVal) {
             detectVal = val;
             detected = deob;
         }
     }
     this.deob = null;
     return detected;
 }
开发者ID:ldh0227,项目名称:de4dot,代码行数:16,代码来源:ObfuscatedFile.cs


注:本文中的IDeobfuscator.detect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。