Пример #1
0
        private static void Fuzz(Stream obj, int taskId)
        {
            var endPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), Port + taskId);

            using (var detector = new WERDetector(new ProcessStartInfoEx()
            {
                FileName = Path,
                Arguments = endPoint.Port.ToString(),
                //RedirectStandardError = true,
                //RedirectStandardOutput = true,
                UseShellExecute = false
            }))
            {
                Thread.Sleep(100);

                //if (!detector.CreatedProcess[0].WaitUntilOutput("Waiting for client connections...", TimeSpan.FromSeconds(2)))
                //{
                //    return;
                //}

                try
                {
                    obj.ConnectoAndCopyTo(endPoint, TimeSpan.FromSeconds(3));
                }
                catch { }

                detector.ThrowIfCrashed(() => ItsAlive(endPoint));
            }
        }
Пример #2
0
        public void TestWerDetector()
        {
            WERDetector w = new WERDetector(new ProcessStartInfoEx(@"D:\CrashDumps\test.exe"));

            byte[]             data;
            EExploitableResult res;

            w.IsCrashed(null, out data, out res, null, null);
        }