Exemple #1
0
        string GetVersionString()
        {
            var versionProviders = new IVersionProvider[] {
                jitMethodsDecrypter,
                memoryMethodsDecrypter,
                proxyCallFixer,
                antiDebugger,
                antiDumping,
                resourceDecrypter,
                constantsDecrypterV18,
                constantsDecrypterV17,
                constantsDecrypterV15,
                stringDecrypter,
                unpacker,
            };

            var vd = new VersionDetector();

            foreach (var versionProvider in versionProviders)
            {
                if (versionProvider == null)
                {
                    continue;
                }
                int minRev, maxRev;
                if (versionProvider.GetRevisionRange(out minRev, out maxRev))
                {
                    if (maxRev == int.MaxValue)
                    {
                        Logger.v("r{0}-latest : {1}", minRev, versionProvider.GetType().Name);
                    }
                    else
                    {
                        Logger.v("r{0}-r{1} : {2}", minRev, maxRev, versionProvider.GetType().Name);
                    }
                    vd.AddRevs(minRev, maxRev);
                }
            }
            if (useAttributeVersion)
            {
                vd.SetVersion(approxVersion);
            }
            return(vd.GetVersionString());
        }
		string GetVersionString() {
			var versionProviders = new IVersionProvider[] {
				jitMethodsDecrypter,
				memoryMethodsDecrypter,
				proxyCallFixer,
				antiDebugger,
				antiDumping,
				resourceDecrypter,
				constantsDecrypterV18,
				constantsDecrypterV17,
				constantsDecrypterV15,
				stringDecrypter,
				unpacker,
			};

			var vd = new VersionDetector();
			foreach (var versionProvider in versionProviders) {
				if (versionProvider == null)
					continue;
				int minRev, maxRev;
				if (versionProvider.GetRevisionRange(out minRev, out maxRev)) {
					if (maxRev == int.MaxValue)
						Logger.v("r{0}-latest : {1}", minRev, versionProvider.GetType().Name);
					else
						Logger.v("r{0}-r{1} : {2}", minRev, maxRev, versionProvider.GetType().Name);
					vd.AddRevs(minRev, maxRev);
				}
			}
			if (useAttributeVersion)
				vd.SetVersion(approxVersion);
			return vd.GetVersionString();
		}