示例#1
0
        private ConsoleAppManager RunConsoleApp(string socketId, DirectoryInfo workingDir, FileInfo dumpPath, string command, DumpIdentifier id)
        {
            command = command.Replace("{bundleid}", id.BundleId);
            command = command.Replace("{dumpid}", id.DumpId);
            command = command.Replace("{dumppath}", dumpPath?.FullName);
            command = command.Replace("{dumpname}", dumpPath?.Name);
            command = command.Replace("{dumpdir}", workingDir?.FullName);

            Utility.ExtractExe(command, out string executable, out string arguments);

            var mgr = new ConsoleAppManager(executable, workingDir);

            socketIdToProcess[socketId] = mgr;
            processToSocketId[mgr]      = socketId;
            mgr.StandartTextReceived   += Mgr_StandartTextReceived;
            mgr.ErrorTextReceived      += Mgr_ErrorTextReceived;
            mgr.ExecuteAsync(arguments);
            return(mgr);
        }
示例#2
0
        private void StartCdb(string socketId, string dumpPath, bool is64Bit)
        {
            string cdbPath;

            if (is64Bit)
            {
                cdbPath = settings.Value.Cdbx64;
            }
            else
            {
                cdbPath = settings.Value.Cdbx86;
            }
            var mgr = new ConsoleAppManager(cdbPath);

            socketIdToProcess[socketId] = mgr;
            processToSocketId[mgr]      = socketId;
            mgr.StandartTextReceived   += Mgr_StandartTextReceived;
            mgr.ErrorTextReceived      += Mgr_ErrorTextReceived;
            mgr.ExecuteAsync($"-z {dumpPath}");

            mgr.WriteLine(".cordll -ve -u -l");             // load DAC and SOS
        }