Beispiel #1
0
        public static bool TryBruteforcingWzIVKey(string wzPath, byte[] wzIvKey)
        {
            using (WzFile wzf = new WzFile(wzPath, wzIvKey))
            {
                string            parseErrorMessage = string.Empty;
                WzFileParseStatus parseStatus       = wzf.ParseMainWzDirectory(true);
                if (parseStatus != WzFileParseStatus.Success)
                {
                    wzf.Dispose();
                    return(false);
                }
                if (wzf.WzDirectory.WzImages.Count > 0 && wzf.WzDirectory.WzImages[0].Name.EndsWith(".img"))
                {
                    wzf.Dispose();
                    return(true);
                }

                wzf.Dispose();
            }
            return(false);
        }