diff --git a/CaptureTraffic/NetFramework/CaptureTraffic/BasicFormatsForCore.dll b/CaptureTraffic/NetFramework/CaptureTraffic/BasicFormatsForCore.dll index 070115d..32fb33e 100644 Binary files a/CaptureTraffic/NetFramework/CaptureTraffic/BasicFormatsForCore.dll and b/CaptureTraffic/NetFramework/CaptureTraffic/BasicFormatsForCore.dll differ diff --git a/CaptureTraffic/NetFramework/CaptureTraffic/CaptureTraffic.csproj b/CaptureTraffic/NetFramework/CaptureTraffic/CaptureTraffic.csproj index b93c9d4..0dbd982 100644 --- a/CaptureTraffic/NetFramework/CaptureTraffic/CaptureTraffic.csproj +++ b/CaptureTraffic/NetFramework/CaptureTraffic/CaptureTraffic.csproj @@ -8,12 +8,27 @@ Exe CaptureTraffic CaptureTraffic - v4.0 + v4.8 512 true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true AnyCPU @@ -24,6 +39,7 @@ DEBUG;TRACE prompt 4 + false AnyCPU @@ -33,6 +49,7 @@ TRACE prompt 4 + false @@ -41,14 +58,23 @@ ..\packages\DotNetZip.1.13.4\lib\net40\DotNetZip.dll - - ..\packages\FiddlerCore.5.0.1\lib\net40\FiddlerCore.dll + + ..\packages\FiddlerCore.5.0.2\lib\net45\FiddlerCore.dll + + + ..\packages\Microsoft.Win32.Registry.4.5.0\lib\net461\Microsoft.Win32.Registry.dll + + ..\packages\System.Security.AccessControl.4.5.0\lib\net461\System.Security.AccessControl.dll + + + ..\packages\System.Security.Principal.Windows.4.5.0\lib\net461\System.Security.Principal.Windows.dll + ..\packages\Telerik.NetworkConnections.0.2.0\lib\net40\Telerik.NetworkConnections.dll @@ -63,9 +89,19 @@ - - PreserveNewest - + + False + Microsoft .NET Framework 4.8 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + diff --git a/CaptureTraffic/NetFramework/CaptureTraffic/Program.cs b/CaptureTraffic/NetFramework/CaptureTraffic/Program.cs index 9e167d9..858cef1 100644 --- a/CaptureTraffic/NetFramework/CaptureTraffic/Program.cs +++ b/CaptureTraffic/NetFramework/CaptureTraffic/Program.cs @@ -63,12 +63,24 @@ namespace CaptureTraffic // be enabled; this allows FiddlerCore to permit modification of // the response in the BeforeResponse handler rather than streaming // the response to the client as the response comes in. - session.bBufferResponse = false; + session.bBufferResponse = true; // Set this property if you want FiddlerCore to automatically authenticate by // answering Digest/Negotiate/NTLM/Kerberos challenges itself // session["X-AutoAuth"] = "(default)"; + // using X-PROCESSINFO to detect sessions by specific processes + if (session["X-PROCESSINFO"].Contains("brave")) { + Console.WriteLine(">>>>>>>>>>>>>>>> ProcessInfo:" + session["X-PROCESSINFO"]); + } + + // using x-no-decrypt to skip decryption for specific sessions + if (session.HTTPMethodIs("CONNECT") && session["X-PROCESSINFO"].Contains("brave")) + { + Console.WriteLine(">>>>>>>>>>>>>>>> ProcessInfo:" + session["X-PROCESSINFO"]); + session["x-no-decrypt"] = "boring process"; + } + try { sessionsLock.EnterWriteLock(); @@ -101,9 +113,19 @@ namespace CaptureTraffic } */ - /* - Fiddler.FiddlerApplication.BeforeResponse += session => { - // Console.WriteLine($"{session.id}:HTTP {session.responseCode} for {session.fullUrl}"); + + FiddlerApplication.BeforeResponse += session => + { + + if (session.uriContains("example.com")) + { + Console.WriteLine($"{session.id}:HTTP {session.responseCode} for {session.fullUrl}"); + + // using utilDecodeResponse and utilReplaceInResponse to modify a response + session.utilDecodeResponse(); + session.utilReplaceInResponse("

", "

"); + session.utilReplaceInResponse("

", ""); + } // Uncomment the following two statements to decompress/unchunk the // HTTP response and subsequently modify any HTTP responses to replace @@ -111,7 +133,7 @@ namespace CaptureTraffic // set session.bBufferResponse = true inside the BeforeRequest event handler above. // //session.utilDecodeResponse(); session.utilReplaceInResponse("Telerik", "Progress"); - };*/ + }; FiddlerApplication.AfterSessionComplete += session => { @@ -180,6 +202,9 @@ namespace CaptureTraffic .OptimizeThreadPool() .Build(); + + CONFIG.DecryptWhichProcesses = ProcessFilterCategories.Browsers; + FiddlerApplication.Startup(startupSettings); FiddlerApplication.Log.LogString($"Created endpoint listening on port {CONFIG.ListenPort}"); diff --git a/CaptureTraffic/NetFramework/CaptureTraffic/app.config b/CaptureTraffic/NetFramework/CaptureTraffic/app.config index 77b1e38..c0c3aed 100644 --- a/CaptureTraffic/NetFramework/CaptureTraffic/app.config +++ b/CaptureTraffic/NetFramework/CaptureTraffic/app.config @@ -1,6 +1,6 @@ - + - + diff --git a/CaptureTraffic/NetFramework/CaptureTraffic/packages.config b/CaptureTraffic/NetFramework/CaptureTraffic/packages.config index ceeccc2..fbbccc9 100644 --- a/CaptureTraffic/NetFramework/CaptureTraffic/packages.config +++ b/CaptureTraffic/NetFramework/CaptureTraffic/packages.config @@ -1,7 +1,7 @@  - - - - + + + + \ No newline at end of file diff --git a/CaptureTraffic/NetStandard/CaptureTraffic/CaptureTraffic.csproj b/CaptureTraffic/NetStandard/CaptureTraffic/CaptureTraffic.csproj index 84d1e37..1866d7d 100644 --- a/CaptureTraffic/NetStandard/CaptureTraffic/CaptureTraffic.csproj +++ b/CaptureTraffic/NetStandard/CaptureTraffic/CaptureTraffic.csproj @@ -6,7 +6,7 @@ - + diff --git a/CaptureTraffic/NuGet.Config b/CaptureTraffic/NuGet.Config deleted file mode 100644 index 7c2f604..0000000 --- a/CaptureTraffic/NuGet.Config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file