docs: update demos
This commit is contained in:
Родитель
a1f0950eae
Коммит
a3d2c494a3
Двоичный файл не отображается.
|
@ -8,12 +8,27 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>CaptureTraffic</RootNamespace>
|
||||
<AssemblyName>CaptureTraffic</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<TargetFrameworkProfile />
|
||||
<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 Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
@ -24,6 +39,7 @@
|
|||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
@ -33,6 +49,7 @@
|
|||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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">
|
||||
<HintPath>..\packages\DotNetZip.1.13.4\lib\net40\DotNetZip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FiddlerCore, Version=5.0.1.0, Culture=neutral, PublicKeyToken=67cb91587178ac5a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FiddlerCore.5.0.1\lib\net40\FiddlerCore.dll</HintPath>
|
||||
<Reference Include="FiddlerCore, Version=5.0.2.0, Culture=neutral, PublicKeyToken=67cb91587178ac5a, processorArchitecture=MSIL">
|
||||
<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 Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<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="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>
|
||||
|
@ -63,9 +89,19 @@
|
|||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="BasicFormatsForCore.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
|
||||
<Visible>False</Visible>
|
||||
<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>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
|
|
@ -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("<h1>", "<h3><i>");
|
||||
session.utilReplaceInResponse("</h1>", "</i></h3>");
|
||||
}
|
||||
|
||||
// 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}");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="BCMakeCert" version="2.0.9" targetFramework="net40" />
|
||||
<package id="DotNetZip" version="1.13.4" targetFramework="net40" />
|
||||
<package id="FiddlerCore" version="5.0.1" targetFramework="net40" />
|
||||
<package id="Telerik.NetworkConnections" version="0.2.0" targetFramework="net40" />
|
||||
<package id="BCMakeCert" version="2.0.9" targetFramework="net48" />
|
||||
<package id="DotNetZip" version="1.13.4" targetFramework="net48" />
|
||||
<package id="FiddlerCore" version="5.0.2" targetFramework="net48" />
|
||||
<package id="Telerik.NetworkConnections" version="0.2.0" targetFramework="net48" />
|
||||
</packages>
|
|
@ -6,7 +6,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FiddlerCore" Version="5.0.1" />
|
||||
<PackageReference Include="FiddlerCore" Version="5.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</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>
|
Загрузка…
Ссылка в новой задаче