Коммит
ef87718c1b
Двоичный файл не отображается.
|
@ -8,12 +8,27 @@
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RootNamespace>CaptureTraffic</RootNamespace>
|
<RootNamespace>CaptureTraffic</RootNamespace>
|
||||||
<AssemblyName>CaptureTraffic</AssemblyName>
|
<AssemblyName>CaptureTraffic</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
<NuGetPackageImportStamp>
|
<NuGetPackageImportStamp>
|
||||||
</NuGetPackageImportStamp>
|
</NuGetPackageImportStamp>
|
||||||
|
<PublishUrl>publish\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Disk</InstallFrom>
|
||||||
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
@ -24,6 +39,7 @@
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
@ -33,6 +49,7 @@
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BCMakeCert, Version=2.0.9.0, Culture=neutral, PublicKeyToken=67cb91587178ac5a, processorArchitecture=MSIL">
|
<Reference Include="BCMakeCert, Version=2.0.9.0, Culture=neutral, PublicKeyToken=67cb91587178ac5a, processorArchitecture=MSIL">
|
||||||
|
@ -41,14 +58,23 @@
|
||||||
<Reference Include="DotNetZip, Version=1.13.4.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
<Reference Include="DotNetZip, Version=1.13.4.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\DotNetZip.1.13.4\lib\net40\DotNetZip.dll</HintPath>
|
<HintPath>..\packages\DotNetZip.1.13.4\lib\net40\DotNetZip.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="FiddlerCore, Version=5.0.1.0, Culture=neutral, PublicKeyToken=67cb91587178ac5a, processorArchitecture=MSIL">
|
<Reference Include="FiddlerCore, Version=5.0.2.0, Culture=neutral, PublicKeyToken=67cb91587178ac5a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\FiddlerCore.5.0.1\lib\net40\FiddlerCore.dll</HintPath>
|
<HintPath>..\packages\FiddlerCore.5.0.2\lib\net45\FiddlerCore.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Win32.Registry, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.Win32.Registry.4.5.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Security.AccessControl, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Security.AccessControl.4.5.0\lib\net461\System.Security.AccessControl.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Security.Principal.Windows.4.5.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="Telerik.NetworkConnections, Version=0.2.0.0, Culture=neutral, PublicKeyToken=67cb91587178ac5a, processorArchitecture=MSIL">
|
<Reference Include="Telerik.NetworkConnections, Version=0.2.0.0, Culture=neutral, PublicKeyToken=67cb91587178ac5a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Telerik.NetworkConnections.0.2.0\lib\net40\Telerik.NetworkConnections.dll</HintPath>
|
<HintPath>..\packages\Telerik.NetworkConnections.0.2.0\lib\net40\Telerik.NetworkConnections.dll</HintPath>
|
||||||
|
@ -63,9 +89,19 @@
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="BasicFormatsForCore.dll">
|
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<Visible>False</Visible>
|
||||||
</None>
|
<ProductName>Microsoft .NET Framework 4.8 %28x86 and x64%29</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="BasicFormatsForCore.dll" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
|
|
@ -63,12 +63,24 @@ namespace CaptureTraffic
|
||||||
// be enabled; this allows FiddlerCore to permit modification of
|
// be enabled; this allows FiddlerCore to permit modification of
|
||||||
// the response in the BeforeResponse handler rather than streaming
|
// the response in the BeforeResponse handler rather than streaming
|
||||||
// the response to the client as the response comes in.
|
// 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
|
// Set this property if you want FiddlerCore to automatically authenticate by
|
||||||
// answering Digest/Negotiate/NTLM/Kerberos challenges itself
|
// answering Digest/Negotiate/NTLM/Kerberos challenges itself
|
||||||
// session["X-AutoAuth"] = "(default)";
|
// 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
|
try
|
||||||
{
|
{
|
||||||
sessionsLock.EnterWriteLock();
|
sessionsLock.EnterWriteLock();
|
||||||
|
@ -101,9 +113,19 @@ namespace CaptureTraffic
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
Fiddler.FiddlerApplication.BeforeResponse += session => {
|
FiddlerApplication.BeforeResponse += session =>
|
||||||
// Console.WriteLine($"{session.id}:HTTP {session.responseCode} for {session.fullUrl}");
|
{
|
||||||
|
|
||||||
|
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("<h1>", "<h3><i>");
|
||||||
|
session.utilReplaceInResponse("</h1>", "</i></h3>");
|
||||||
|
}
|
||||||
|
|
||||||
// Uncomment the following two statements to decompress/unchunk the
|
// Uncomment the following two statements to decompress/unchunk the
|
||||||
// HTTP response and subsequently modify any HTTP responses to replace
|
// 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.
|
// set session.bBufferResponse = true inside the BeforeRequest event handler above.
|
||||||
//
|
//
|
||||||
//session.utilDecodeResponse(); session.utilReplaceInResponse("Telerik", "Progress");
|
//session.utilDecodeResponse(); session.utilReplaceInResponse("Telerik", "Progress");
|
||||||
};*/
|
};
|
||||||
|
|
||||||
FiddlerApplication.AfterSessionComplete += session =>
|
FiddlerApplication.AfterSessionComplete += session =>
|
||||||
{
|
{
|
||||||
|
@ -180,6 +202,9 @@ namespace CaptureTraffic
|
||||||
.OptimizeThreadPool()
|
.OptimizeThreadPool()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
||||||
|
CONFIG.DecryptWhichProcesses = ProcessFilterCategories.Browsers;
|
||||||
|
|
||||||
FiddlerApplication.Startup(startupSettings);
|
FiddlerApplication.Startup(startupSettings);
|
||||||
|
|
||||||
FiddlerApplication.Log.LogString($"Created endpoint listening on port {CONFIG.ListenPort}");
|
FiddlerApplication.Log.LogString($"Created endpoint listening on port {CONFIG.ListenPort}");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||||
</startup>
|
</startup>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="BCMakeCert" version="2.0.9" targetFramework="net40" />
|
<package id="BCMakeCert" version="2.0.9" targetFramework="net48" />
|
||||||
<package id="DotNetZip" version="1.13.4" targetFramework="net40" />
|
<package id="DotNetZip" version="1.13.4" targetFramework="net48" />
|
||||||
<package id="FiddlerCore" version="5.0.1" targetFramework="net40" />
|
<package id="FiddlerCore" version="5.0.2" targetFramework="net48" />
|
||||||
<package id="Telerik.NetworkConnections" version="0.2.0" targetFramework="net40" />
|
<package id="Telerik.NetworkConnections" version="0.2.0" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
|
@ -6,7 +6,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FiddlerCore" Version="5.0.1" />
|
<PackageReference Include="FiddlerCore" Version="5.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="nuget.telerik.com/" value="https://nuget.telerik.com/nuget" />
|
|
||||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
|
Загрузка…
Ссылка в новой задаче