mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Microsoft Sign-in: Migrate to our own client Id (#1827)
* Microsoft Sign-in: Migrate to our own client Id - Drop support of "mcc" sign-in method - Add nuget packages for decoding JWT * Remove JWT nuget package * Remove client secret It is not needed after changing application type in Azure * Change token validation method to expiration time * Revert changes of dropping mcc sign-in method * Add email pre-fill for browser sign-in
This commit is contained in:
parent
9a9245f193
commit
fdc3069083
6 changed files with 622 additions and 501 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -9,4 +9,5 @@
|
||||||
/.vs/
|
/.vs/
|
||||||
SessionCache.ini
|
SessionCache.ini
|
||||||
.*
|
.*
|
||||||
!/.github
|
!/.github
|
||||||
|
/packages
|
||||||
|
|
@ -1,427 +1,428 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||||
<ProductVersion>8.0.30703</ProductVersion>
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{1E2FACE4-F5CA-4323-9641-740C6A551770}</ProjectGuid>
|
<ProjectGuid>{1E2FACE4-F5CA-4323-9641-740C6A551770}</ProjectGuid>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>MinecraftClient</RootNamespace>
|
<RootNamespace>MinecraftClient</RootNamespace>
|
||||||
<AssemblyName>MinecraftClient</AssemblyName>
|
<AssemblyName>MinecraftClient</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<PublishUrl>publish\</PublishUrl>
|
<PublishUrl>publish\</PublishUrl>
|
||||||
<Install>true</Install>
|
<Install>true</Install>
|
||||||
<InstallFrom>Disk</InstallFrom>
|
<InstallFrom>Disk</InstallFrom>
|
||||||
<UpdateEnabled>false</UpdateEnabled>
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
<UpdateMode>Foreground</UpdateMode>
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
<UpdateInterval>7</UpdateInterval>
|
<UpdateInterval>7</UpdateInterval>
|
||||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
<UpdatePeriodically>false</UpdatePeriodically>
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
<UpdateRequired>false</UpdateRequired>
|
<UpdateRequired>false</UpdateRequired>
|
||||||
<MapFileExtensions>true</MapFileExtensions>
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
<ApplicationRevision>0</ApplicationRevision>
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SignManifests>false</SignManifests>
|
<SignManifests>false</SignManifests>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>Resources\AppIcon.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\AppIcon.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<StartupObject>MinecraftClient.Program</StartupObject>
|
<StartupObject>MinecraftClient.Program</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AutoTimeout.cs" />
|
<Compile Include="AutoTimeout.cs" />
|
||||||
<Compile Include="ChatBots\AutoDrop.cs" />
|
<Compile Include="ChatBots\AutoDrop.cs" />
|
||||||
<Compile Include="ChatBots\Mailer.cs" />
|
<Compile Include="ChatBots\Mailer.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette118.cs" />
|
<Compile Include="Protocol\JwtPayloadDecode.cs" />
|
||||||
<Compile Include="Protocol\MojangAPI.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette118.cs" />
|
||||||
<Compile Include="Mapping\CubeFromWorld.cs" />
|
<Compile Include="Protocol\MojangAPI.cs" />
|
||||||
<Compile Include="Mapping\Material2Tool.cs" />
|
<Compile Include="Mapping\CubeFromWorld.cs" />
|
||||||
<Compile Include="ChatBots\ReplayCapture.cs" />
|
<Compile Include="Mapping\Material2Tool.cs" />
|
||||||
<Compile Include="Commands\DropItem.cs" />
|
<Compile Include="ChatBots\ReplayCapture.cs" />
|
||||||
<Compile Include="Commands\Entitycmd.cs" />
|
<Compile Include="Commands\DropItem.cs" />
|
||||||
<Compile Include="ChatBots\Alerts.cs" />
|
<Compile Include="Commands\Entitycmd.cs" />
|
||||||
<Compile Include="ChatBots\AntiAFK.cs" />
|
<Compile Include="ChatBots\Alerts.cs" />
|
||||||
<Compile Include="ChatBots\AutoAttack.cs" />
|
<Compile Include="ChatBots\AntiAFK.cs" />
|
||||||
<Compile Include="ChatBots\AutoCraft.cs" />
|
<Compile Include="ChatBots\AutoAttack.cs" />
|
||||||
<Compile Include="ChatBots\AutoEat.cs" />
|
<Compile Include="ChatBots\AutoCraft.cs" />
|
||||||
<Compile Include="ChatBots\AutoFishing.cs" />
|
<Compile Include="ChatBots\AutoEat.cs" />
|
||||||
<Compile Include="ChatBots\AutoRespond.cs" />
|
<Compile Include="ChatBots\AutoFishing.cs" />
|
||||||
<Compile Include="ChatBots\AutoRelog.cs" />
|
<Compile Include="ChatBots\AutoRespond.cs" />
|
||||||
<Compile Include="ChatBots\ChatLog.cs" />
|
<Compile Include="ChatBots\AutoRelog.cs" />
|
||||||
<Compile Include="ChatBots\HangmanGame.cs" />
|
<Compile Include="ChatBots\ChatLog.cs" />
|
||||||
<Compile Include="ChatBots\PlayerListLogger.cs" />
|
<Compile Include="ChatBots\HangmanGame.cs" />
|
||||||
<Compile Include="ChatBots\RemoteControl.cs" />
|
<Compile Include="ChatBots\PlayerListLogger.cs" />
|
||||||
<Compile Include="ChatBots\Script.cs" />
|
<Compile Include="ChatBots\RemoteControl.cs" />
|
||||||
<Compile Include="ChatBots\ScriptScheduler.cs" />
|
<Compile Include="ChatBots\Script.cs" />
|
||||||
<Compile Include="ChatBots\TestBot.cs" />
|
<Compile Include="ChatBots\ScriptScheduler.cs" />
|
||||||
<Compile Include="ChatBot.cs" />
|
<Compile Include="ChatBots\TestBot.cs" />
|
||||||
<Compile Include="Command.cs" />
|
<Compile Include="ChatBot.cs" />
|
||||||
<Compile Include="Commands\Animation.cs" />
|
<Compile Include="Command.cs" />
|
||||||
<Compile Include="Commands\ChangeSlot.cs" />
|
<Compile Include="Commands\Animation.cs" />
|
||||||
<Compile Include="Commands\Connect.cs" />
|
<Compile Include="Commands\ChangeSlot.cs" />
|
||||||
<Compile Include="Commands\Debug.cs" />
|
<Compile Include="Commands\Connect.cs" />
|
||||||
<Compile Include="Commands\Dig.cs" />
|
<Compile Include="Commands\Debug.cs" />
|
||||||
<Compile Include="Commands\Inventory.cs" />
|
<Compile Include="Commands\Dig.cs" />
|
||||||
<Compile Include="Commands\Look.cs" />
|
<Compile Include="Commands\Inventory.cs" />
|
||||||
<Compile Include="Commands\Move.cs" />
|
<Compile Include="Commands\Look.cs" />
|
||||||
<Compile Include="Commands\Exit.cs" />
|
<Compile Include="Commands\Move.cs" />
|
||||||
<Compile Include="Commands\Log.cs" />
|
<Compile Include="Commands\Exit.cs" />
|
||||||
<Compile Include="Commands\Reco.cs" />
|
<Compile Include="Commands\Log.cs" />
|
||||||
<Compile Include="Commands\Respawn.cs" />
|
<Compile Include="Commands\Reco.cs" />
|
||||||
<Compile Include="Commands\Script.cs" />
|
<Compile Include="Commands\Respawn.cs" />
|
||||||
<Compile Include="Commands\Send.cs" />
|
<Compile Include="Commands\Script.cs" />
|
||||||
<Compile Include="Commands\Set.cs" />
|
<Compile Include="Commands\Send.cs" />
|
||||||
<Compile Include="Commands\Health.cs" />
|
<Compile Include="Commands\Set.cs" />
|
||||||
<Compile Include="Commands\Sneak.cs" />
|
<Compile Include="Commands\Health.cs" />
|
||||||
<Compile Include="Commands\Tps.cs" />
|
<Compile Include="Commands\Sneak.cs" />
|
||||||
<Compile Include="Commands\Useblock.cs" />
|
<Compile Include="Commands\Tps.cs" />
|
||||||
<Compile Include="Commands\UseItem.cs" />
|
<Compile Include="Commands\Useblock.cs" />
|
||||||
<Compile Include="DefaultConfigResource.Designer.cs">
|
<Compile Include="Commands\UseItem.cs" />
|
||||||
<AutoGen>True</AutoGen>
|
<Compile Include="DefaultConfigResource.Designer.cs">
|
||||||
<DesignTime>True</DesignTime>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>DefaultConfigResource.resx</DependentUpon>
|
<DesignTime>True</DesignTime>
|
||||||
</Compile>
|
<DependentUpon>DefaultConfigResource.resx</DependentUpon>
|
||||||
<Compile Include="Logger\FileLogLogger.cs" />
|
</Compile>
|
||||||
<Compile Include="Logger\ILogger.cs" />
|
<Compile Include="Logger\FileLogLogger.cs" />
|
||||||
<Compile Include="INIFile.cs" />
|
<Compile Include="Logger\ILogger.cs" />
|
||||||
<Compile Include="Inventory\Container.cs" />
|
<Compile Include="INIFile.cs" />
|
||||||
<Compile Include="Inventory\ContainerType.cs" />
|
<Compile Include="Inventory\Container.cs" />
|
||||||
<Compile Include="Inventory\ContainerTypeExtensions.cs" />
|
<Compile Include="Inventory\ContainerType.cs" />
|
||||||
<Compile Include="Inventory\Effects.cs" />
|
<Compile Include="Inventory\ContainerTypeExtensions.cs" />
|
||||||
<Compile Include="Inventory\Hand.cs" />
|
<Compile Include="Inventory\Effects.cs" />
|
||||||
<Compile Include="Inventory\Item.cs" />
|
<Compile Include="Inventory\Hand.cs" />
|
||||||
<Compile Include="Inventory\ItemMovingHelper.cs" />
|
<Compile Include="Inventory\Item.cs" />
|
||||||
<Compile Include="Inventory\ItemPalettes\ItemPalette.cs" />
|
<Compile Include="Inventory\ItemMovingHelper.cs" />
|
||||||
<Compile Include="Inventory\ItemPalettes\ItemPalette115.cs" />
|
<Compile Include="Inventory\ItemPalettes\ItemPalette.cs" />
|
||||||
<Compile Include="Inventory\ItemPalettes\ItemPalette1161.cs" />
|
<Compile Include="Inventory\ItemPalettes\ItemPalette115.cs" />
|
||||||
<Compile Include="Inventory\ItemPalettes\ItemPalette1162.cs" />
|
<Compile Include="Inventory\ItemPalettes\ItemPalette1161.cs" />
|
||||||
<Compile Include="Inventory\ItemPalettes\ItemPaletteGenerator.cs" />
|
<Compile Include="Inventory\ItemPalettes\ItemPalette1162.cs" />
|
||||||
<Compile Include="Inventory\ItemType.cs" />
|
<Compile Include="Inventory\ItemPalettes\ItemPaletteGenerator.cs" />
|
||||||
<Compile Include="Inventory\ItemTypeExtensions.cs" />
|
<Compile Include="Inventory\ItemType.cs" />
|
||||||
<Compile Include="Inventory\WindowActionType.cs" />
|
<Compile Include="Inventory\ItemTypeExtensions.cs" />
|
||||||
<Compile Include="Logger\LoggerBase.cs" />
|
<Compile Include="Inventory\WindowActionType.cs" />
|
||||||
<Compile Include="Mapping\BlockPalettes\Palette112.cs" />
|
<Compile Include="Logger\LoggerBase.cs" />
|
||||||
<Compile Include="Mapping\BlockPalettes\Palette113.cs" />
|
<Compile Include="Mapping\BlockPalettes\Palette112.cs" />
|
||||||
<Compile Include="Mapping\BlockPalettes\Palette114.cs" />
|
<Compile Include="Mapping\BlockPalettes\Palette113.cs" />
|
||||||
<Compile Include="Mapping\BlockPalettes\Palette115.cs" />
|
<Compile Include="Mapping\BlockPalettes\Palette114.cs" />
|
||||||
<Compile Include="Mapping\BlockPalettes\BlockPaletteGenerator.cs" />
|
<Compile Include="Mapping\BlockPalettes\Palette115.cs" />
|
||||||
<Compile Include="Mapping\BlockPalettes\BlockPalette.cs" />
|
<Compile Include="Mapping\BlockPalettes\BlockPaletteGenerator.cs" />
|
||||||
<Compile Include="Mapping\BlockPalettes\Palette116.cs" />
|
<Compile Include="Mapping\BlockPalettes\BlockPalette.cs" />
|
||||||
<Compile Include="Mapping\CommandBlockFlags.cs" />
|
<Compile Include="Mapping\BlockPalettes\Palette116.cs" />
|
||||||
<Compile Include="Mapping\CommandBlockMode.cs" />
|
<Compile Include="Mapping\CommandBlockFlags.cs" />
|
||||||
<Compile Include="Mapping\Entity.cs" />
|
<Compile Include="Mapping\CommandBlockMode.cs" />
|
||||||
<Compile Include="Mapping\EntityPalettes\EntityPalette112.cs" />
|
<Compile Include="Mapping\Entity.cs" />
|
||||||
<Compile Include="Mapping\EntityPalettes\EntityPalette113.cs" />
|
<Compile Include="Mapping\EntityPalettes\EntityPalette112.cs" />
|
||||||
<Compile Include="Mapping\EntityPalettes\EntityPalette.cs" />
|
<Compile Include="Mapping\EntityPalettes\EntityPalette113.cs" />
|
||||||
<Compile Include="Mapping\EntityPalettes\EntityPalette114.cs" />
|
<Compile Include="Mapping\EntityPalettes\EntityPalette.cs" />
|
||||||
<Compile Include="Mapping\EntityPalettes\EntityPalette115.cs" />
|
<Compile Include="Mapping\EntityPalettes\EntityPalette114.cs" />
|
||||||
<Compile Include="Mapping\EntityPalettes\EntityPalette1161.cs" />
|
<Compile Include="Mapping\EntityPalettes\EntityPalette115.cs" />
|
||||||
<Compile Include="Mapping\EntityPalettes\EntityPalette1162.cs" />
|
<Compile Include="Mapping\EntityPalettes\EntityPalette1161.cs" />
|
||||||
<Compile Include="Mapping\EntityPose.cs" />
|
<Compile Include="Mapping\EntityPalettes\EntityPalette1162.cs" />
|
||||||
<Compile Include="Mapping\EntityType.cs" />
|
<Compile Include="Mapping\EntityPose.cs" />
|
||||||
<Compile Include="Mapping\EntityPalettes\EntityPaletteGenerator.cs" />
|
<Compile Include="Mapping\EntityType.cs" />
|
||||||
<Compile Include="Mapping\EntityTypeExtensions.cs" />
|
<Compile Include="Mapping\EntityPalettes\EntityPaletteGenerator.cs" />
|
||||||
<Compile Include="Mapping\MaterialExtensions.cs" />
|
<Compile Include="Mapping\EntityTypeExtensions.cs" />
|
||||||
<Compile Include="Logger\FilteredLogger.cs" />
|
<Compile Include="Mapping\MaterialExtensions.cs" />
|
||||||
<Compile Include="Protocol\EntityActionType.cs" />
|
<Compile Include="Logger\FilteredLogger.cs" />
|
||||||
<Compile Include="Protocol\GuidExtensions.cs" />
|
<Compile Include="Protocol\EntityActionType.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\DeflateStream.cs" />
|
<Compile Include="Protocol\GuidExtensions.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\ParallelDeflateOutputStream.cs" />
|
<Compile Include="Protocol\Handlers\Compression\DeflateStream.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ComHelper.cs" />
|
<Compile Include="Protocol\Handlers\Compression\ParallelDeflateOutputStream.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\EncryptionAlgorithm.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ComHelper.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\Events.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\EncryptionAlgorithm.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\Exceptions.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\Events.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ExtractExistingFileAction.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\Exceptions.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\FileSelector.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ExtractExistingFileAction.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\OffsetStream.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\FileSelector.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\Shared.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\OffsetStream.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\WinZipAes.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\Shared.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipConstants.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\WinZipAes.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipCrypto.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipConstants.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipDirEntry.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipCrypto.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipEntry.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipDirEntry.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipEntry.Extract.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipEntry.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipEntry.Read.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipEntry.Extract.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipEntry.Write.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipEntry.Read.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipEntrySource.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipEntry.Write.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipErrorAction.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipEntrySource.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.AddUpdate.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipErrorAction.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Check.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.AddUpdate.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Check.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Events.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Extract.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Events.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Read.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Extract.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Save.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Read.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.SaveSelfExtractor.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Save.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Selector.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.SaveSelfExtractor.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.x-IEnumerable.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.Selector.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipInputStream.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipFile.x-IEnumerable.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipOutputStream.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipInputStream.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zip\ZipSegmentedStream.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipOutputStream.cs" />
|
||||||
<Compile Include="Protocol\Handlers\DataTypes.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zip\ZipSegmentedStream.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Forge\FMLVersion.cs" />
|
<Compile Include="Protocol\Handlers\DataTypes.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette110.cs" />
|
<Compile Include="Protocol\Handlers\Forge\FMLVersion.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette112.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette110.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette1122.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette112.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette113.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette1122.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette114.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette113.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette115.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette114.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette116.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette115.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette1162.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette116.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette117.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette1162.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette17.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette117.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPaletteHelper.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPalette17.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketType18Handler.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketPaletteHelper.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketPalettes\PacketTypePalette.cs" />
|
<Compile Include="Protocol\Handlers\PacketType18Handler.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketTypesIn.cs" />
|
<Compile Include="Protocol\Handlers\PacketPalettes\PacketTypePalette.cs" />
|
||||||
<Compile Include="Protocol\Handlers\PacketTypesOut.cs" />
|
<Compile Include="Protocol\Handlers\PacketTypesIn.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Protocol18Forge.cs" />
|
<Compile Include="Protocol\Handlers\PacketTypesOut.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Protocol18Terrain.cs" />
|
<Compile Include="Protocol\Handlers\Protocol18Forge.cs" />
|
||||||
<Compile Include="Protocol\Handlers\SocketWrapper.cs" />
|
<Compile Include="Protocol\Handlers\Protocol18Terrain.cs" />
|
||||||
<Compile Include="Protocol\DataTypeGenerator.cs" />
|
<Compile Include="Protocol\Handlers\SocketWrapper.cs" />
|
||||||
<Compile Include="FileMonitor.cs" />
|
<Compile Include="Protocol\DataTypeGenerator.cs" />
|
||||||
<Compile Include="Inventory\VillagerTrade.cs" />
|
<Compile Include="FileMonitor.cs" />
|
||||||
<Compile Include="Protocol\MicrosoftAuthentication.cs" />
|
<Compile Include="Inventory\VillagerTrade.cs" />
|
||||||
<Compile Include="Protocol\ProxiedWebRequest.cs" />
|
<Compile Include="Protocol\MicrosoftAuthentication.cs" />
|
||||||
<Compile Include="Protocol\ReplayHandler.cs" />
|
<Compile Include="Protocol\ProxiedWebRequest.cs" />
|
||||||
<Compile Include="TaskWithDelay.cs" />
|
<Compile Include="Protocol\ReplayHandler.cs" />
|
||||||
<Compile Include="TaskWithResult.cs" />
|
<Compile Include="TaskWithDelay.cs" />
|
||||||
<Compile Include="Translations.cs" />
|
<Compile Include="TaskWithResult.cs" />
|
||||||
<Compile Include="Inventory\VillagerInfo.cs" />
|
<Compile Include="Translations.cs" />
|
||||||
<Compile Include="WinAPI\ConsoleIcon.cs" />
|
<Compile Include="Inventory\VillagerInfo.cs" />
|
||||||
<Compile Include="ConsoleIO.cs" />
|
<Compile Include="WinAPI\ConsoleIcon.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\AesFastEngine.cs" />
|
<Compile Include="ConsoleIO.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\BufferedBlockCipher.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\AesFastEngine.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\BufferedCipherBase.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\BufferedBlockCipher.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\CfbBlockCipher.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\BufferedCipherBase.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\Check.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\CfbBlockCipher.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\CipherStream.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\Check.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\CryptoException.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\CipherStream.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\DataLengthException.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\CryptoException.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\IBlockCipher.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\DataLengthException.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\IBufferedCipher.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\IBlockCipher.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\ICipherParameters.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\IBufferedCipher.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\KeyParameter.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\ICipherParameters.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\OutputLengthException.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\KeyParameter.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\Pack.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\OutputLengthException.cs" />
|
||||||
<Compile Include="Crypto\Streams\BouncyAes\ParametersWithIV.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\Pack.cs" />
|
||||||
<Compile Include="Crypto\Streams\MonoAesStream.cs" />
|
<Compile Include="Crypto\Streams\BouncyAes\ParametersWithIV.cs" />
|
||||||
<Compile Include="Crypto\Streams\RegularAesStream.cs" />
|
<Compile Include="Crypto\Streams\MonoAesStream.cs" />
|
||||||
<Compile Include="Crypto\CryptoHandler.cs" />
|
<Compile Include="Crypto\Streams\RegularAesStream.cs" />
|
||||||
<Compile Include="CSharpRunner.cs" />
|
<Compile Include="Crypto\CryptoHandler.cs" />
|
||||||
<Compile Include="Json.cs" />
|
<Compile Include="CSharpRunner.cs" />
|
||||||
<Compile Include="Mapping\Block.cs" />
|
<Compile Include="Json.cs" />
|
||||||
<Compile Include="Mapping\Chunk.cs" />
|
<Compile Include="Mapping\Block.cs" />
|
||||||
<Compile Include="Mapping\ChunkColumn.cs" />
|
<Compile Include="Mapping\Chunk.cs" />
|
||||||
<Compile Include="Mapping\Direction.cs" />
|
<Compile Include="Mapping\ChunkColumn.cs" />
|
||||||
<Compile Include="Mapping\Material.cs" />
|
<Compile Include="Mapping\Direction.cs" />
|
||||||
<Compile Include="Mapping\Movement.cs" />
|
<Compile Include="Mapping\Material.cs" />
|
||||||
<Compile Include="Mapping\World.cs" />
|
<Compile Include="Mapping\Movement.cs" />
|
||||||
<Compile Include="Protocol\ChatParser.cs" />
|
<Compile Include="Mapping\World.cs" />
|
||||||
<Compile Include="Protocol\Dns\Header.cs" />
|
<Compile Include="Protocol\ChatParser.cs" />
|
||||||
<Compile Include="Protocol\Dns\Question.cs" />
|
<Compile Include="Protocol\Dns\Header.cs" />
|
||||||
<Compile Include="Protocol\Dns\RecordReader.cs" />
|
<Compile Include="Protocol\Dns\Question.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordA6.cs" />
|
<Compile Include="Protocol\Dns\RecordReader.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordAPL.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordA6.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordATMA.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordAPL.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordCERT.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordATMA.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordDHCID.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordCERT.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordDNSKEY.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordDHCID.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordEID.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordDNSKEY.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordGID.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordEID.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordHIP.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordGID.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordIPSECKEY.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordHIP.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordNIMLOC.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordIPSECKEY.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordNSEC.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordNIMLOC.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordNSEC3.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordNSEC.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordNSEC3PARAM.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordNSEC3.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordOPT.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordNSEC3PARAM.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordRRSIG.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordOPT.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordSINK.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordRRSIG.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordSPF.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordSINK.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordSSHFP.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordSPF.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordUID.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordSSHFP.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordUINFO.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordUID.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordUnknown.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordUINFO.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\NotUsed\RecordUNSPEC.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordUnknown.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\Obsolete\RecordGPOS.cs" />
|
<Compile Include="Protocol\Dns\Records\NotUsed\RecordUNSPEC.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\Obsolete\RecordMD.cs" />
|
<Compile Include="Protocol\Dns\Records\Obsolete\RecordGPOS.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\Obsolete\RecordMF.cs" />
|
<Compile Include="Protocol\Dns\Records\Obsolete\RecordMD.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\Obsolete\RecordNSAPPTR.cs" />
|
<Compile Include="Protocol\Dns\Records\Obsolete\RecordMF.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\Obsolete\RecordNXT.cs" />
|
<Compile Include="Protocol\Dns\Records\Obsolete\RecordNSAPPTR.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\Record.cs" />
|
<Compile Include="Protocol\Dns\Records\Obsolete\RecordNXT.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordA.cs" />
|
<Compile Include="Protocol\Dns\Records\Record.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordAAAA.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordA.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordAFSDB.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordAAAA.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordCNAME.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordAFSDB.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordDNAME.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordCNAME.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordDS.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordDNAME.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordHINFO.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordDS.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordISDN.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordHINFO.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordKEY.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordISDN.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordKX.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordKEY.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordLOC.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordKX.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordMB.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordLOC.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordMG.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordMB.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordMINFO.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordMG.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordMR.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordMINFO.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordMX.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordMR.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordNAPTR.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordMX.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordNS.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordNAPTR.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordNSAP.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordNS.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordNULL.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordNSAP.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordPTR.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordNULL.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordPX.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordPTR.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordRP.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordPX.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordRT.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordRP.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordSIG.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordRT.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordSOA.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordSIG.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordSRV.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordSOA.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordTKEY.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordSRV.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordTSIG.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordTKEY.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordTXT.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordTSIG.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordWKS.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordTXT.cs" />
|
||||||
<Compile Include="Protocol\Dns\Records\RecordX25.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordWKS.cs" />
|
||||||
<Compile Include="Protocol\Dns\Request.cs" />
|
<Compile Include="Protocol\Dns\Records\RecordX25.cs" />
|
||||||
<Compile Include="Protocol\Dns\Resolver.cs" />
|
<Compile Include="Protocol\Dns\Request.cs" />
|
||||||
<Compile Include="Protocol\Dns\Response.cs" />
|
<Compile Include="Protocol\Dns\Resolver.cs" />
|
||||||
<Compile Include="Protocol\Dns\RR.cs" />
|
<Compile Include="Protocol\Dns\Response.cs" />
|
||||||
<Compile Include="Protocol\Dns\Structs.cs" />
|
<Compile Include="Protocol\Dns\RR.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Forge\FMLHandshakeClientState.cs" />
|
<Compile Include="Protocol\Dns\Structs.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Forge\FMLHandshakeDiscriminator.cs" />
|
<Compile Include="Protocol\Handlers\Forge\FMLHandshakeClientState.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Forge\ForgeInfo.cs" />
|
<Compile Include="Protocol\Handlers\Forge\FMLHandshakeDiscriminator.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\CRC32.cs" />
|
<Compile Include="Protocol\Handlers\Forge\ForgeInfo.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Deflate.cs" />
|
<Compile Include="Protocol\Handlers\Compression\CRC32.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\GZipStream.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Deflate.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Inflate.cs" />
|
<Compile Include="Protocol\Handlers\Compression\GZipStream.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\InfTree.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Inflate.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Tree.cs" />
|
<Compile Include="Protocol\Handlers\Compression\InfTree.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\Zlib.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Tree.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\ZlibBaseStream.cs" />
|
<Compile Include="Protocol\Handlers\Compression\Zlib.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\ZlibCodec.cs" />
|
<Compile Include="Protocol\Handlers\Compression\ZlibBaseStream.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\ZlibConstants.cs" />
|
<Compile Include="Protocol\Handlers\Compression\ZlibCodec.cs" />
|
||||||
<Compile Include="Protocol\Handlers\ZlibUtils.cs" />
|
<Compile Include="Protocol\Handlers\Compression\ZlibConstants.cs" />
|
||||||
<Compile Include="Crypto\IAesStream.cs" />
|
<Compile Include="Protocol\Handlers\ZlibUtils.cs" />
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Crypto\IAesStream.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="McClient.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Compression\ZlibStream.cs" />
|
<Compile Include="McClient.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Protocol18.cs" />
|
<Compile Include="Protocol\Handlers\Compression\ZlibStream.cs" />
|
||||||
<Compile Include="Protocol\Handlers\Protocol16.cs" />
|
<Compile Include="Protocol\Handlers\Protocol18.cs" />
|
||||||
<Compile Include="Protocol\IMinecraftCom.cs" />
|
<Compile Include="Protocol\Handlers\Protocol16.cs" />
|
||||||
<Compile Include="Protocol\IMinecraftComHandler.cs" />
|
<Compile Include="Protocol\IMinecraftCom.cs" />
|
||||||
<Compile Include="Protocol\ProtocolHandler.cs" />
|
<Compile Include="Protocol\IMinecraftComHandler.cs" />
|
||||||
<Compile Include="Protocol\Session\CacheType.cs" />
|
<Compile Include="Protocol\ProtocolHandler.cs" />
|
||||||
<Compile Include="Protocol\Session\SessionCache.cs" />
|
<Compile Include="Protocol\Session\CacheType.cs" />
|
||||||
<Compile Include="Protocol\Session\SessionToken.cs" />
|
<Compile Include="Protocol\Session\SessionCache.cs" />
|
||||||
<Compile Include="Proxy\ProxyHandler.cs" />
|
<Compile Include="Protocol\Session\SessionToken.cs" />
|
||||||
<Compile Include="Proxy\Handlers\EventArgs\CreateConnectionAsyncCompletedEventArgs.cs" />
|
<Compile Include="Proxy\ProxyHandler.cs" />
|
||||||
<Compile Include="Proxy\Handlers\Exceptions\ProxyException.cs" />
|
<Compile Include="Proxy\Handlers\EventArgs\CreateConnectionAsyncCompletedEventArgs.cs" />
|
||||||
<Compile Include="Proxy\Handlers\HttpProxyClient.cs" />
|
<Compile Include="Proxy\Handlers\Exceptions\ProxyException.cs" />
|
||||||
<Compile Include="Proxy\Handlers\IProxyClient.cs" />
|
<Compile Include="Proxy\Handlers\HttpProxyClient.cs" />
|
||||||
<Compile Include="Proxy\Handlers\ProxyClientFactory.cs" />
|
<Compile Include="Proxy\Handlers\IProxyClient.cs" />
|
||||||
<Compile Include="Proxy\Handlers\Socks4aProxyClient.cs" />
|
<Compile Include="Proxy\Handlers\ProxyClientFactory.cs" />
|
||||||
<Compile Include="Proxy\Handlers\Socks4ProxyClient.cs" />
|
<Compile Include="Proxy\Handlers\Socks4aProxyClient.cs" />
|
||||||
<Compile Include="Proxy\Handlers\Socks5ProxyClient.cs" />
|
<Compile Include="Proxy\Handlers\Socks4ProxyClient.cs" />
|
||||||
<Compile Include="Proxy\Handlers\Utils.cs" />
|
<Compile Include="Proxy\Handlers\Socks5ProxyClient.cs" />
|
||||||
<Compile Include="Settings.cs" />
|
<Compile Include="Proxy\Handlers\Utils.cs" />
|
||||||
<Compile Include="Commands\List.cs" />
|
<Compile Include="Settings.cs" />
|
||||||
<Compile Include="Mapping\Location.cs" />
|
<Compile Include="Commands\List.cs" />
|
||||||
<Compile Include="WinAPI\ExitCleanUp.cs" />
|
<Compile Include="Mapping\Location.cs" />
|
||||||
<Compile Include="WinAPI\WindowsVersion.cs" />
|
<Compile Include="WinAPI\ExitCleanUp.cs" />
|
||||||
</ItemGroup>
|
<Compile Include="WinAPI\WindowsVersion.cs" />
|
||||||
<ItemGroup>
|
</ItemGroup>
|
||||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
<ItemGroup>
|
||||||
<Visible>False</Visible>
|
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||||
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
<Visible>False</Visible>
|
||||||
<Install>true</Install>
|
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
||||||
</BootstrapperPackage>
|
<Install>true</Install>
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
</BootstrapperPackage>
|
||||||
<Visible>False</Visible>
|
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
<Visible>False</Visible>
|
||||||
<Install>false</Install>
|
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||||
</BootstrapperPackage>
|
<Install>false</Install>
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
</BootstrapperPackage>
|
||||||
<Visible>False</Visible>
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
<Visible>False</Visible>
|
||||||
<Install>false</Install>
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
</BootstrapperPackage>
|
<Install>false</Install>
|
||||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
</BootstrapperPackage>
|
||||||
<Visible>False</Visible>
|
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||||
<ProductName>Windows Installer 3.1</ProductName>
|
<Visible>False</Visible>
|
||||||
<Install>true</Install>
|
<ProductName>Windows Installer 3.1</ProductName>
|
||||||
</BootstrapperPackage>
|
<Install>true</Install>
|
||||||
</ItemGroup>
|
</BootstrapperPackage>
|
||||||
<ItemGroup>
|
</ItemGroup>
|
||||||
<Content Include="Protocol\Dns\Records\totla.txt" />
|
<ItemGroup>
|
||||||
<Content Include="Resources\AppIcon.ico" />
|
<Content Include="Protocol\Dns\Records\totla.txt" />
|
||||||
<Content Include="Resources\containers\ContainerType.BrewingStand.txt" />
|
<Content Include="Resources\AppIcon.ico" />
|
||||||
<Content Include="Resources\containers\ContainerType.Crafting.txt" />
|
<Content Include="Resources\containers\ContainerType.BrewingStand.txt" />
|
||||||
<Content Include="Resources\containers\ContainerType.Generic_3x3.txt" />
|
<Content Include="Resources\containers\ContainerType.Crafting.txt" />
|
||||||
<Content Include="Resources\containers\ContainerType.Generic_9x3.txt" />
|
<Content Include="Resources\containers\ContainerType.Generic_3x3.txt" />
|
||||||
<Content Include="Resources\containers\ContainerType.Generic_9x6.txt" />
|
<Content Include="Resources\containers\ContainerType.Generic_9x3.txt" />
|
||||||
<Content Include="Resources\containers\ContainerType.PlayerInventory.txt" />
|
<Content Include="Resources\containers\ContainerType.Generic_9x6.txt" />
|
||||||
</ItemGroup>
|
<Content Include="Resources\containers\ContainerType.PlayerInventory.txt" />
|
||||||
<ItemGroup>
|
</ItemGroup>
|
||||||
<EmbeddedResource Include="DefaultConfigResource.resx">
|
<ItemGroup>
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<EmbeddedResource Include="DefaultConfigResource.resx">
|
||||||
<LastGenOutput>DefaultConfigResource.Designer.cs</LastGenOutput>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
</EmbeddedResource>
|
<LastGenOutput>DefaultConfigResource.Designer.cs</LastGenOutput>
|
||||||
</ItemGroup>
|
</EmbeddedResource>
|
||||||
<ItemGroup>
|
</ItemGroup>
|
||||||
<None Include="Resources\config\MinecraftClient.ini" />
|
<ItemGroup>
|
||||||
<None Include="Resources\lang\de.ini" />
|
<None Include="Resources\config\MinecraftClient.ini" />
|
||||||
<None Include="Resources\lang\en.ini" />
|
<None Include="Resources\lang\de.ini" />
|
||||||
</ItemGroup>
|
<None Include="Resources\lang\en.ini" />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
</ItemGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
<Target Name="BeforeBuild">
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
</Target>
|
<Target Name="BeforeBuild">
|
||||||
<Target Name="AfterBuild">
|
</Target>
|
||||||
</Target>
|
<Target Name="AfterBuild">
|
||||||
-->
|
</Target>
|
||||||
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -143,10 +143,8 @@ namespace MinecraftClient
|
||||||
|
|
||||||
//Asking the user to type in missing data such as Username and Password
|
//Asking the user to type in missing data such as Username and Password
|
||||||
bool useBrowser = Settings.AccountType == ProtocolHandler.AccountType.Microsoft && Settings.LoginMethod == "browser";
|
bool useBrowser = Settings.AccountType == ProtocolHandler.AccountType.Microsoft && Settings.LoginMethod == "browser";
|
||||||
if (Settings.Login == "")
|
if (Settings.Login == "" && !useBrowser)
|
||||||
{
|
{
|
||||||
if (useBrowser)
|
|
||||||
ConsoleIO.WriteLine("Press Enter to skip session cache checking and continue sign-in with browser");
|
|
||||||
Console.Write(ConsoleIO.BasicIO ? Translations.Get("mcc.login_basic_io") + "\n" : Translations.Get("mcc.login"));
|
Console.Write(ConsoleIO.BasicIO ? Translations.Get("mcc.login_basic_io") + "\n" : Translations.Get("mcc.login"));
|
||||||
Settings.Login = Console.ReadLine();
|
Settings.Login = Console.ReadLine();
|
||||||
}
|
}
|
||||||
|
|
@ -213,7 +211,7 @@ namespace MinecraftClient
|
||||||
if (result != ProtocolHandler.LoginResult.Success)
|
if (result != ProtocolHandler.LoginResult.Success)
|
||||||
{
|
{
|
||||||
Translations.WriteLineFormatted("mcc.session_invalid");
|
Translations.WriteLineFormatted("mcc.session_invalid");
|
||||||
if (Settings.Password == "")
|
if (Settings.Password == "" && Settings.AccountType == ProtocolHandler.AccountType.Mojang)
|
||||||
RequestPassword();
|
RequestPassword();
|
||||||
}
|
}
|
||||||
else ConsoleIO.WriteLineFormatted(Translations.Get("mcc.session_valid", session.PlayerName));
|
else ConsoleIO.WriteLineFormatted(Translations.Get("mcc.session_valid", session.PlayerName));
|
||||||
|
|
|
||||||
34
MinecraftClient/Protocol/JwtPayloadDecode.cs
Normal file
34
MinecraftClient/Protocol/JwtPayloadDecode.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace MinecraftClient.Protocol
|
||||||
|
{
|
||||||
|
// Thanks to https://stackoverflow.com/questions/60404612/parse-jwt-token-to-get-the-payload-content-only-without-external-library-in-c-sh
|
||||||
|
public static class JwtPayloadDecode
|
||||||
|
{
|
||||||
|
public static string GetPayload(string token)
|
||||||
|
{
|
||||||
|
var content = token.Split('.')[1];
|
||||||
|
var jsonPayload = Encoding.UTF8.GetString(Decode(content));
|
||||||
|
return jsonPayload;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static byte[] Decode(string input)
|
||||||
|
{
|
||||||
|
var output = input;
|
||||||
|
output = output.Replace('-', '+'); // 62nd char of encoding
|
||||||
|
output = output.Replace('_', '/'); // 63rd char of encoding
|
||||||
|
switch (output.Length % 4) // Pad with trailing '='s
|
||||||
|
{
|
||||||
|
case 0: break; // No pad chars in this case
|
||||||
|
case 2: output += "=="; break; // Two pad chars
|
||||||
|
case 3: output += "="; break; // One pad char
|
||||||
|
default: throw new System.ArgumentOutOfRangeException("input", "Illegal base64url string!");
|
||||||
|
}
|
||||||
|
var converted = Convert.FromBase64String(output); // Standard base64 decoder
|
||||||
|
return converted;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,9 +4,110 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace MinecraftClient.Protocol
|
namespace MinecraftClient.Protocol
|
||||||
{
|
{
|
||||||
|
static class Microsoft
|
||||||
|
{
|
||||||
|
private static readonly string clientId = "54473e32-df8f-42e9-a649-9419b0dab9d3";
|
||||||
|
private static readonly string signinUrl = string.Format("https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize?client_id={0}&response_type=code&redirect_uri=https%3A%2F%2Fmccteam.github.io%2Fredirect.html&scope=XboxLive.signin%20offline_access%20openid%20email&prompt=select_account&response_mode=fragment", clientId);
|
||||||
|
private static readonly string tokenUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token";
|
||||||
|
|
||||||
|
public static string SignInUrl { get { return signinUrl; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a sign-in URL with email field pre-filled
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="loginHint">Login Email</param>
|
||||||
|
/// <returns>Sign-in URL with email pre-filled</returns>
|
||||||
|
public static string GetSignInUrlWithHint(string loginHint)
|
||||||
|
{
|
||||||
|
return SignInUrl + "&login_hint=" + Uri.EscapeDataString(loginHint);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Request access token by auth code
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="code">Auth code obtained after user signing in</param>
|
||||||
|
/// <returns>Access token and refresh token</returns>
|
||||||
|
public static LoginResponse RequestAccessToken(string code)
|
||||||
|
{
|
||||||
|
string postData = "client_id={0}&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fmccteam.github.io%2Fredirect.html&code={1}";
|
||||||
|
postData = string.Format(postData, clientId, code);
|
||||||
|
return RequestToken(postData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Request access token by refresh token
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="refreshToken">Refresh token</param>
|
||||||
|
/// <returns>Access token and new refresh token</returns>
|
||||||
|
public static LoginResponse RefreshAccessToken(string refreshToken)
|
||||||
|
{
|
||||||
|
string postData = "client_id={0}&grant_type=refresh_token&redirect_uri=https%3A%2F%2Fmccteam.github.io%2Fredirect.html&refresh_token={1}";
|
||||||
|
postData = string.Format(postData, clientId, refreshToken);
|
||||||
|
return RequestToken(postData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Perform request to obtain access token by code or by refresh token
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="postData">Complete POST data for the request</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private static LoginResponse RequestToken(string postData)
|
||||||
|
{
|
||||||
|
var request = new ProxiedWebRequest(tokenUrl);
|
||||||
|
request.UserAgent = "MCC/" + Program.Version;
|
||||||
|
var response = request.Post("application/x-www-form-urlencoded", postData);
|
||||||
|
var jsonData = Json.ParseJson(response.Body);
|
||||||
|
|
||||||
|
// Error handling
|
||||||
|
if (jsonData.Properties.ContainsKey("error"))
|
||||||
|
{
|
||||||
|
throw new Exception(jsonData.Properties["error_description"].StringValue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string accessToken = jsonData.Properties["access_token"].StringValue;
|
||||||
|
string refreshToken = jsonData.Properties["refresh_token"].StringValue;
|
||||||
|
int expiresIn = int.Parse(jsonData.Properties["expires_in"].StringValue);
|
||||||
|
|
||||||
|
// Extract email from JWT
|
||||||
|
string payload = JwtPayloadDecode.GetPayload(jsonData.Properties["id_token"].StringValue);
|
||||||
|
var jsonPayload = Json.ParseJson(payload);
|
||||||
|
string email = jsonPayload.Properties["email"].StringValue;
|
||||||
|
return new LoginResponse()
|
||||||
|
{
|
||||||
|
Email = email,
|
||||||
|
AccessToken = accessToken,
|
||||||
|
RefreshToken = refreshToken,
|
||||||
|
ExpiresIn = expiresIn
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void OpenBrowser(string link)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Process.Start(link);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
ConsoleIO.WriteLine("Cannot open browser\n" + e.Message + "\n" + e.StackTrace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct LoginResponse
|
||||||
|
{
|
||||||
|
public string Email;
|
||||||
|
public string AccessToken;
|
||||||
|
public string RefreshToken;
|
||||||
|
public int ExpiresIn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class XboxLive
|
class XboxLive
|
||||||
{
|
{
|
||||||
private readonly string authorize = "https://login.live.com/oauth20_authorize.srf?client_id=000000004C12AE6F&redirect_uri=https://login.live.com/oauth20_desktop.srf&scope=service::user.auth.xboxlive.com::MBI_SSL&display=touch&response_type=token&locale=en";
|
private readonly string authorize = "https://login.live.com/oauth20_authorize.srf?client_id=000000004C12AE6F&redirect_uri=https://login.live.com/oauth20_desktop.srf&scope=service::user.auth.xboxlive.com::MBI_SSL&display=touch&response_type=token&locale=en";
|
||||||
|
|
@ -63,7 +164,7 @@ namespace MinecraftClient.Protocol
|
||||||
/// <param name="password">Account password</param>
|
/// <param name="password">Account password</param>
|
||||||
/// <param name="preAuth"></param>
|
/// <param name="preAuth"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public UserLoginResponse UserLogin(string email, string password, PreAuthResponse preAuth)
|
public Microsoft.LoginResponse UserLogin(string email, string password, PreAuthResponse preAuth)
|
||||||
{
|
{
|
||||||
var request = new ProxiedWebRequest(preAuth.UrlPost, preAuth.Cookie);
|
var request = new ProxiedWebRequest(preAuth.UrlPost, preAuth.Cookie);
|
||||||
request.UserAgent = userAgent;
|
request.UserAgent = userAgent;
|
||||||
|
|
@ -104,8 +205,9 @@ namespace MinecraftClient.Protocol
|
||||||
// Console.WriteLine("{0}: {1}", pair.Key, pair.Value);
|
// Console.WriteLine("{0}: {1}", pair.Key, pair.Value);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
return new UserLoginResponse()
|
return new Microsoft.LoginResponse()
|
||||||
{
|
{
|
||||||
|
Email = email,
|
||||||
AccessToken = dict["access_token"],
|
AccessToken = dict["access_token"],
|
||||||
RefreshToken = dict["refresh_token"],
|
RefreshToken = dict["refresh_token"],
|
||||||
ExpiresIn = int.Parse(dict["expires_in"])
|
ExpiresIn = int.Parse(dict["expires_in"])
|
||||||
|
|
@ -131,18 +233,26 @@ namespace MinecraftClient.Protocol
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="loginResponse"></param>
|
/// <param name="loginResponse"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public XblAuthenticateResponse XblAuthenticate(UserLoginResponse loginResponse)
|
public XblAuthenticateResponse XblAuthenticate(Microsoft.LoginResponse loginResponse)
|
||||||
{
|
{
|
||||||
var request = new ProxiedWebRequest(xbl);
|
var request = new ProxiedWebRequest(xbl);
|
||||||
request.UserAgent = userAgent;
|
request.UserAgent = userAgent;
|
||||||
request.Accept = "application/json";
|
request.Accept = "application/json";
|
||||||
request.Headers.Add("x-xbl-contract-version", "0");
|
request.Headers.Add("x-xbl-contract-version", "0");
|
||||||
|
|
||||||
|
var accessToken = loginResponse.AccessToken;
|
||||||
|
if (Settings.LoginMethod == "browser")
|
||||||
|
{
|
||||||
|
// Our own client ID must have d= in front of the token or HTTP status 400
|
||||||
|
// "Stolen" client ID must not have d= in front of the token or HTTP status 400
|
||||||
|
accessToken = "d=" + accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
string payload = "{"
|
string payload = "{"
|
||||||
+ "\"Properties\": {"
|
+ "\"Properties\": {"
|
||||||
+ "\"AuthMethod\": \"RPS\","
|
+ "\"AuthMethod\": \"RPS\","
|
||||||
+ "\"SiteName\": \"user.auth.xboxlive.com\","
|
+ "\"SiteName\": \"user.auth.xboxlive.com\","
|
||||||
+ "\"RpsTicket\": \"" + loginResponse.AccessToken + "\""
|
+ "\"RpsTicket\": \"" + accessToken + "\""
|
||||||
+ "},"
|
+ "},"
|
||||||
+ "\"RelyingParty\": \"http://auth.xboxlive.com\","
|
+ "\"RelyingParty\": \"http://auth.xboxlive.com\","
|
||||||
+ "\"TokenType\": \"JWT\""
|
+ "\"TokenType\": \"JWT\""
|
||||||
|
|
@ -241,13 +351,6 @@ namespace MinecraftClient.Protocol
|
||||||
public NameValueCollection Cookie;
|
public NameValueCollection Cookie;
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct UserLoginResponse
|
|
||||||
{
|
|
||||||
public string AccessToken;
|
|
||||||
public string RefreshToken;
|
|
||||||
public int ExpiresIn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public struct XblAuthenticateResponse
|
public struct XblAuthenticateResponse
|
||||||
{
|
{
|
||||||
public string Token;
|
public string Token;
|
||||||
|
|
|
||||||
|
|
@ -357,7 +357,7 @@ namespace MinecraftClient.Protocol
|
||||||
if (Settings.LoginMethod == "mcc")
|
if (Settings.LoginMethod == "mcc")
|
||||||
return MicrosoftMCCLogin(user, pass, out session);
|
return MicrosoftMCCLogin(user, pass, out session);
|
||||||
else
|
else
|
||||||
return MicrosoftBrowserLogin(out session);
|
return MicrosoftBrowserLogin(out session, user);
|
||||||
}
|
}
|
||||||
else if (type == AccountType.Mojang)
|
else if (type == AccountType.Mojang)
|
||||||
{
|
{
|
||||||
|
|
@ -490,46 +490,19 @@ namespace MinecraftClient.Protocol
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="session"></param>
|
/// <param name="session"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static LoginResult MicrosoftBrowserLogin(out SessionToken session)
|
public static LoginResult MicrosoftBrowserLogin(out SessionToken session, string loginHint = "")
|
||||||
{
|
{
|
||||||
var ms = new XboxLive();
|
if (string.IsNullOrEmpty(loginHint))
|
||||||
string[] askOpenLink =
|
Microsoft.OpenBrowser(Microsoft.SignInUrl);
|
||||||
{
|
else
|
||||||
"Copy the following link to your browser and login to your Microsoft Account",
|
Microsoft.OpenBrowser(Microsoft.GetSignInUrlWithHint(loginHint));
|
||||||
">>>>>>>>>>>>>>>>>>>>>>",
|
ConsoleIO.WriteLine("Your browser should open automatically. If not, open the link below in your browser.");
|
||||||
"",
|
ConsoleIO.WriteLine("\n" + Microsoft.SignInUrl + "\n");
|
||||||
ms.SignInUrl,
|
|
||||||
"",
|
ConsoleIO.WriteLine("Paste your code here");
|
||||||
"<<<<<<<<<<<<<<<<<<<<<<",
|
string code = ConsoleIO.ReadLine();
|
||||||
"NOTICE: Once successfully logged in, you will see a blank page in your web browser.",
|
|
||||||
"Copy the contents of your browser's address bar and paste it below to complete the login process.",
|
var msaResponse = Microsoft.RequestAccessToken(code);
|
||||||
};
|
|
||||||
ConsoleIO.WriteLine(string.Join("\n", askOpenLink));
|
|
||||||
string[] parts = { };
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
string link = ConsoleIO.ReadLine();
|
|
||||||
if (string.IsNullOrEmpty(link))
|
|
||||||
{
|
|
||||||
session = new SessionToken();
|
|
||||||
return LoginResult.UserCancel;
|
|
||||||
}
|
|
||||||
parts = link.Split('#');
|
|
||||||
if (parts.Length < 2)
|
|
||||||
{
|
|
||||||
ConsoleIO.WriteLine("Invalid link. Please try again.");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else break;
|
|
||||||
}
|
|
||||||
string hash = parts[1];
|
|
||||||
var dict = Request.ParseQueryString(hash);
|
|
||||||
var msaResponse = new XboxLive.UserLoginResponse()
|
|
||||||
{
|
|
||||||
AccessToken = dict["access_token"],
|
|
||||||
RefreshToken = dict["refresh_token"],
|
|
||||||
ExpiresIn = int.Parse(dict["expires_in"])
|
|
||||||
};
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return MicrosoftLogin(msaResponse, out session);
|
return MicrosoftLogin(msaResponse, out session);
|
||||||
|
|
@ -546,7 +519,7 @@ namespace MinecraftClient.Protocol
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static LoginResult MicrosoftLogin(XboxLive.UserLoginResponse msaResponse, out SessionToken session)
|
private static LoginResult MicrosoftLogin(Microsoft.LoginResponse msaResponse, out SessionToken session)
|
||||||
{
|
{
|
||||||
session = new SessionToken() { ClientID = Guid.NewGuid().ToString().Replace("-", "") };
|
session = new SessionToken() { ClientID = Guid.NewGuid().ToString().Replace("-", "") };
|
||||||
var ms = new XboxLive();
|
var ms = new XboxLive();
|
||||||
|
|
@ -565,6 +538,7 @@ namespace MinecraftClient.Protocol
|
||||||
session.PlayerName = profile.UserName;
|
session.PlayerName = profile.UserName;
|
||||||
session.PlayerID = profile.UUID;
|
session.PlayerID = profile.UUID;
|
||||||
session.ID = accessToken;
|
session.ID = accessToken;
|
||||||
|
Settings.Login = msaResponse.Email;
|
||||||
return LoginResult.Success;
|
return LoginResult.Success;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -590,27 +564,24 @@ namespace MinecraftClient.Protocol
|
||||||
/// <returns>Returns the status of the token (Valid, Invalid, etc.)</returns>
|
/// <returns>Returns the status of the token (Valid, Invalid, etc.)</returns>
|
||||||
public static LoginResult GetTokenValidation(SessionToken session)
|
public static LoginResult GetTokenValidation(SessionToken session)
|
||||||
{
|
{
|
||||||
try
|
var payload = JwtPayloadDecode.GetPayload(session.ID);
|
||||||
|
var json = Json.ParseJson(payload);
|
||||||
|
var expTimestamp = long.Parse(json.Properties["exp"].StringValue);
|
||||||
|
var now = DateTime.Now;
|
||||||
|
var tokenExp = UnixTimeStampToDateTime(expTimestamp);
|
||||||
|
if (Settings.DebugMessages)
|
||||||
{
|
{
|
||||||
string result = "";
|
ConsoleIO.WriteLine("Access token expiration time is " + tokenExp.ToString());
|
||||||
string json_request = "{\"accessToken\": \"" + JsonEncode(session.ID) + "\", \"clientToken\": \"" + JsonEncode(session.ClientID) + "\" }";
|
|
||||||
int code = DoHTTPSPost("authserver.mojang.com", "/validate", json_request, ref result);
|
|
||||||
if (code == 204)
|
|
||||||
{
|
|
||||||
return LoginResult.Success;
|
|
||||||
}
|
|
||||||
else if (code == 403)
|
|
||||||
{
|
|
||||||
return LoginResult.LoginRequired;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return LoginResult.OtherError;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch
|
if (now < tokenExp)
|
||||||
{
|
{
|
||||||
return LoginResult.OtherError;
|
// Still valid
|
||||||
|
return LoginResult.Success;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Token expired
|
||||||
|
return LoginResult.LoginRequired;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -897,5 +868,18 @@ namespace MinecraftClient.Protocol
|
||||||
|
|
||||||
return result.ToString();
|
return result.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Convert a TimeStamp (in second) to DateTime object
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="unixTimeStamp">TimeStamp in second</param>
|
||||||
|
/// <returns>DateTime object of the TimeStamp</returns>
|
||||||
|
public static DateTime UnixTimeStampToDateTime(long unixTimeStamp)
|
||||||
|
{
|
||||||
|
// Unix timestamp is seconds past epoch
|
||||||
|
DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
|
||||||
|
dateTime = dateTime.AddSeconds(unixTimeStamp).ToLocalTime();
|
||||||
|
return dateTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue