diff --git a/TorWebClient/TorClient/Client.cs b/TorWebClient/TorClient/Client.cs index f39ec5b..9696abb 100644 --- a/TorWebClient/TorClient/Client.cs +++ b/TorWebClient/TorClient/Client.cs @@ -323,11 +323,13 @@ namespace Tor psi.CreateNoWindow = true; psi.UseShellExecute = false; psi.WindowStyle = ProcessWindowStyle.Hidden; + psi.RedirectStandardOutput = true; psi.WorkingDirectory = Path.GetDirectoryName(createParams.Path); try { process = new Process(); + process.OutputDataReceived += OutputDataReceived; process.EnableRaisingEvents = true; process.Exited += new EventHandler(OnHandleProcessExited); process.StartInfo = psi; @@ -339,6 +341,7 @@ namespace Tor throw new TorException("The tor application process failed to launch"); } + process.BeginOutputReadLine(); } catch (Exception exception) { @@ -367,6 +370,11 @@ namespace Tor }); } } + + private void OutputDataReceived(object sender, DataReceivedEventArgs e) + { + Console.WriteLine(e.Data); + } /// /// Shuts down the tor application process and releases the associated components of the class. diff --git a/TorWebClient/TorWebClient.v12.suo b/TorWebClient/TorWebClient.v12.suo index f4a8b50..96dd93e 100644 Binary files a/TorWebClient/TorWebClient.v12.suo and b/TorWebClient/TorWebClient.v12.suo differ