示例#1
0
        /// <inheritdoc/>
        public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
        {
            // "Packed by SPEEnc V2 Asterios Parlamentas.PE"
            byte?[] check         = new byte?[] { 0x50, 0x61, 0x63, 0x6B, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x53, 0x50, 0x45, 0x45, 0x6E, 0x63, 0x20, 0x56, 0x32, 0x20, 0x41, 0x73, 0x74, 0x65, 0x72, 0x69, 0x6F, 0x73, 0x20, 0x50, 0x61, 0x72, 0x6C, 0x61, 0x6D, 0x65, 0x6E, 0x74, 0x61, 0x73, 0x2E, 0x50, 0x45 };
            bool    containsCheck = fileContent.FirstPosition(check, out int position);

            // "GetModuleHandleA" + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00 + "GetProcAddress" + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00 + "LoadLibraryA" + (char)0x00 + (char)0x00 + "KERNEL32.dll" + (char)0x00 + "ëy" + (char)0x01 + "SNIF"
            byte?[] check2         = { 0x47, 0x65, 0x74, 0x4D, 0x6F, 0x64, 0x75, 0x6C, 0x65, 0x48, 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x41, 0x00, 0x00, 0x00, 0x00, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6F, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x6F, 0x61, 0x64, 0x4C, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x41, 0x00, 0x00, 0x4B, 0x45, 0x52, 0x4E, 0x45, 0x4C, 0x33, 0x32, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0xEB, 0x79, 0x01, 0x53, 0x4E, 0x49, 0x46 };
            bool    containsCheck2 = fileContent.FirstPosition(check2, out int position2);

            if (containsCheck && containsCheck2)
            {
                return($"LaserLock {GetVersion(fileContent, position2)} {GetBuild(fileContent, true)}" + (includePosition ? $" (Index {position}, {position2})" : string.Empty));
            }
            else if (containsCheck && !containsCheck2)
            {
                return($"LaserLock Marathon {GetBuild(fileContent, false)}" + (includePosition ? $" (Index {position})" : string.Empty));
            }
            else if (!containsCheck && containsCheck2)
            {
                return($"LaserLock {GetVersion(fileContent, --position2)} {GetBuild(fileContent, false)}" + (includePosition ? $" (Index {position2})" : string.Empty));
            }

            if (file != null && string.Equals(Path.GetFileName(file), "NOMOUSE.SP", StringComparison.OrdinalIgnoreCase))
            {
                return($"LaserLock {GetVersion16Bit(fileContent)}" + (includePosition ? $" (Index 71)" : string.Empty));
            }

            return(MatchUtil.GetFirstMatch(file, fileContent, contentMatchers, includePosition));
        }
示例#2
0
        /// <inheritdoc/>
        public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
        {
            var matchers = new List <ContentMatchSet>
            {
                // This string is found in the .imp files associated with this protection.
                // WTM76545
                new ContentMatchSet(new byte?[] { 0x57, 0x54, 0x4D, 0x37, 0x36, 0x35, 0x34, 0x35 }, "WTM CD Protect"),

                // Found in the copy protected setup used by this protection.
                // wtmdum.imp
                new ContentMatchSet(new byte?[] { 0x77, 0x74, 0x6D, 0x64, 0x75, 0x6D, 0x2E, 0x69, 0x6D, 0x70 }, "WTM CD Protect"),

                // WTM DIGITAL Photo Protect
                new ContentMatchSet(new byte?[]
                {
                    0x57, 0x54, 0x4D, 0x20, 0x44, 0x49, 0x47, 0x49,
                    0x54, 0x41, 0x4C, 0x20, 0x50, 0x68, 0x6F, 0x74,
                    0x6F, 0x20, 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63,
                    0x74
                }, "WTM Protection Viewer"),

                // WTM Copy Protection Viewer
                new ContentMatchSet(new byte?[]
                {
                    0x48, 0x61, 0x6E, 0x73, 0x70, 0x65, 0x74, 0x65, 0x72
                }, "WTM Protection Viewer"),
            };

            return(MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition));
        }
示例#3
0
 public void Input2()
 {
     _processor.Setup(x => x.RunCommand(MatchUtil.CreateForCharList("foo"))).Returns(RunResult.Completed).Verifiable();
     ProcessWithEnter("foo");
     _factory.Verify();
     Assert.AreEqual(String.Empty, _modeRaw.Command);
 }
示例#4
0
        /// <inheritdoc/>
        public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
        {
            var matchers = new List <ContentMatchSet>
            {
                // protected-tages-runtime.exe
                new ContentMatchSet(new byte?[]
                {
                    0x70, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x65,
                    0x64, 0x2D, 0x74, 0x61, 0x67, 0x65, 0x73, 0x2D,
                    0x72, 0x75, 0x6E, 0x74, 0x69, 0x6D, 0x65, 0x2E,
                    0x65, 0x78, 0x65
                }, Utilities.GetFileVersion, "TAGES"),

                // tagesprotection.com
                new ContentMatchSet(new byte?[]
                {
                    0x74, 0x61, 0x67, 0x65, 0x73, 0x70, 0x72, 0x6F,
                    0x74, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x2E,
                    0x63, 0x6F, 0x6D
                }, Utilities.GetFileVersion, "TAGES"),

                // (char)0xE8 + u + (char)0x00 + (char)0x00 + (char)0x00 + (char)0xE8
                new ContentMatchSet(new byte?[] { 0xE8, 0x75, 0x00, 0x00, 0x00, 0xE8 }, GetVersion, "TAGES"),
            };

            return(MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition));
        }
示例#5
0
        /// <inheritdoc/>
        public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
        {
            var matchers = new List <ContentMatchSet>
            {
                // Found in GO.EXE
                // XCP.DAT
                new ContentMatchSet(new byte?[] { 0x58, 0x43, 0x50, 0x2E, 0x44, 0x41, 0x54 }, "XCP"),

                // Found in GO.EXE
                // XCPPlugins.dll
                new ContentMatchSet(new byte?[]
                {
                    0x58, 0x43, 0x50, 0x50, 0x6C, 0x75, 0x67, 0x69,
                    0x6E, 0x73, 0x2E, 0x64, 0x6C, 0x6C
                }, "XCP"),

                // Found in GO.EXE
                // XCPPhoenix.dll
                new ContentMatchSet(new byte?[]
                {
                    0x58, 0x43, 0x50, 0x50, 0x68, 0x6F, 0x65, 0x6E,
                    0x69, 0x78, 0x2E, 0x64, 0x6C, 0x6C
                }, "XCP"),

                // xcpdrive
                new ContentMatchSet(new byte?[]
                {
                    0x78, 0x63, 0x70, 0x64, 0x72, 0x69, 0x76, 0x65
                }, "XCP"),
            };

            return(MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition));
        }
示例#6
0
        /// <inheritdoc/>
        public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
        {
            var matchers = new List <ContentMatchSet>
            {
                // @HC09
                new ContentMatchSet(new byte?[] { 0x40, 0x48, 0x43, 0x30, 0x39, 0x20, 0x20, 0x20, 0x20 }, "JoWooD X-Prot v2"),

                new ContentMatchSet(new List <byte?[]>
                {
                    // .ext
                    new byte?[] { 0x2E, 0x65, 0x78, 0x74, 0x20, 0x20, 0x20, 0x20 },

                    // kernel32.dll + (char)0x00 + (char)0x00 + (char)0x00 + VirtualProtect
                    new byte?[]
                    {
                        0x6B, 0x65, 0x72, 0x6E, 0x65, 0x6C, 0x33, 0x32,
                        0x2E, 0x64, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x56,
                        0x69, 0x72, 0x74, 0x75, 0x61, 0x6C, 0x50, 0x72,
                        0x6F, 0x74, 0x65, 0x63, 0x74
                    },
                }, GetVersion, "JoWooD X-Prot"),

                // .ext
                new ContentMatchSet(new byte?[] { 0x2E, 0x65, 0x78, 0x74, 0x20, 0x20, 0x20, 0x20 }, "JoWooD X-Prot v1"),
            };

            return(MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition));
        }
示例#7
0
    IEnumerator CoWaitDrag(Vector3 initPos)
    {
        isReady = false;
        while (true)
        {
            if (Input.GetMouseButtonUp(0))
            {
                break;
            }
            var   mousePos = InputEx.GetMouseWorld();
            float distance = Vector3.Distance(initPos, mousePos);
            if (distance > Global.DRAG_DISTANCE)
            {
                //드래그 완료
                Direction dir         = BoardUtil.GetDirection(initPos, mousePos);
                Block     changeBlock = BlockManager.instance.GetNeighbor(selectBlock, dir);
                if (changeBlock == null)
                {
                    break;
                }
                //블록 스왑
                yield return(StartCoroutine(BlockManager.instance.CoSwapBlock(selectBlock, changeBlock)));

                var selectInfos = MatchManager.instance.Check(selectBlock);
                var targetInfos = MatchManager.instance.Check(changeBlock);
                curMatchInfos = MatchUtil.Distinct(selectInfos.Union(targetInfos).ToList());
                //스왑 실패 (Undo)
                if (curMatchInfos.Count == 0)
                {
                    Debug.Log("Swap Fail");
                    yield return(StartCoroutine(BlockManager.instance.CoUndoSwap()));

                    break;
                }
                //중력 적용 후 맵 생성 (추가 Match가 없을때까지 반복)
                while (true)
                {
                    if (curMatchInfos.Count == 0)
                    {
                        break;
                    }
                    BlockManager.instance.DestoryBlocks(MatchUtil.GetCoordsAll(curMatchInfos));
                    yield return(StartCoroutine(BlockManager.instance.CoApplyGravityAndGenerateMap()));

                    curMatchInfos = MatchManager.instance.CheckAll();
                }
                break;
            }
            yield return(null);
        }
        if (BlockManager.instance.totalTopCount == 0)
        {
            Debug.Log("Win!");
        }

        //초기화
        selectBlock = null;
        isReady     = true;
    }
示例#8
0
        /// <inheritdoc/>
        public List <string> CheckDirectoryPath(string path, IEnumerable <string> files)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("LaunchCd.exe", useEndsWith: true), "MediaMax CD-3"),
            };

            return(MatchUtil.GetAllMatches(files, matchers, any: true));
        }
示例#9
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("PlayDVD.exe", useEndsWith: true), "Alpha-DVD"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#10
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("sunncomm.ico", useEndsWith: true), "MediaCloQ"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#11
0
 public void DoubleCommand1()
 {
     _processor.Setup(x => x.RunCommand(MatchUtil.CreateForCharList("2"))).Returns(RunResult.Completed).Verifiable();
     ProcessWithEnter("2");
     _factory.Verify();
     _processor.Setup(x => x.RunCommand(MatchUtil.CreateForCharList("3"))).Returns(RunResult.Completed).Verifiable();
     ProcessWithEnter("3");
     _factory.Verify();
 }
示例#12
0
        /// <inheritdoc/>
        public ConcurrentQueue <string> CheckDirectoryPath(string path, IEnumerable <string> files)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("WinLock.PSX", useEndsWith: true), "Winlock"),
            };

            return(MatchUtil.GetAllMatches(files, matchers, any: true));
        }
示例#13
0
        /// <inheritdoc/>
        public ConcurrentQueue <string> CheckDirectoryPath(string path, IEnumerable <string> files)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("cdac11ba.exe", useEndsWith: true), "SafeCast"),
            };

            return(MatchUtil.GetAllMatches(files, matchers, any: true));
        }
示例#14
0
        /// <inheritdoc/>
        public List <string> CheckDirectoryPath(string path, IEnumerable <string> files)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("DvdCrypt.pdb", useEndsWith: true), "DVD Crypt"),
            };

            return(MatchUtil.GetAllMatches(files, matchers, any: true));
        }
示例#15
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("VOB-PCD.KEY", useEndsWith: true), "VOB ProtectCD/DVD"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#16
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("00000001.LT1", useEndsWith: true), "SafeDisc Lite"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#17
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("Zzz.aze", useEndsWith: true), "Zzxzz"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#18
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("FREELOCK.IMG", useEndsWith: true), "FreeLock"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#19
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("UplayInstaller.exe", useEndsWith: true), "Uplay"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#20
0
        /// <inheritdoc/>
        public List <string> CheckDirectoryPath(string path, IEnumerable <string> files)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("sunncomm.ico", useEndsWith: true), "MediaCloQ"),
            };

            return(MatchUtil.GetAllMatches(files, matchers, any: true));
        }
示例#21
0
        /// <inheritdoc/>
        public List <string> CheckDirectoryPath(string path, IEnumerable <string> files)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("PlayDVD.exe", useEndsWith: true), "Alpha-DVD"),
            };

            return(MatchUtil.GetAllMatches(files, matchers, any: true));
        }
示例#22
0
        /// <inheritdoc/>
        public List <string> CheckDirectoryPath(string path, IEnumerable <string> files)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("ImpulseReactor.dll", useEndsWith: true), Utilities.GetFileVersion, "Impulse Reactor"),
            };

            return(MatchUtil.GetAllMatches(files, matchers, any: true));
        }
示例#23
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("00000.svm", useEndsWith: true), GetVersion, "BD+"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#24
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("_742893.016", useEndsWith: true), "TZCopyProtector"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#25
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("WinLock.PSX", useEndsWith: true), "Winlock"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#26
0
        /// <inheritdoc/>
        public ConcurrentQueue <string> CheckDirectoryPath(string path, IEnumerable <string> files)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("_742893.016", useEndsWith: true), "TZCopyProtector"),
            };

            return(MatchUtil.GetAllMatches(files, matchers, any: true));
        }
示例#27
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("cdac11ba.exe", useEndsWith: true), "SafeCast"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#28
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("LaunchCd.exe", useEndsWith: true), "MediaMax CD-3"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#29
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("DvdCrypt.pdb", useEndsWith: true), "DVD Crypt"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }
示例#30
0
        /// <inheritdoc/>
        public string CheckFilePath(string path)
        {
            var matchers = new List <PathMatchSet>
            {
                new PathMatchSet(new PathMatch("ImpulseReactor.dll", useEndsWith: true), Utilities.GetFileVersion, "Impulse Reactor"),
            };

            return(MatchUtil.GetFirstMatch(path, matchers, any: true));
        }