mirror of
https://github.com/SteamRE/DepotDownloader.git
synced 2026-10-20 11:39:47 +00:00
Compare commits
57
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6396afe2e3 | ||
|
|
16a95c1bfd | ||
|
|
989f37b1fb | ||
|
|
8275f16d3e | ||
|
|
e7474cb9ee | ||
|
|
c124842e86 | ||
|
|
b1557786b2 | ||
|
|
ae192f6448 | ||
|
|
48b0f51c53 | ||
|
|
1e8e20c72c | ||
|
|
c5fc766986 | ||
|
|
d178832b38 | ||
|
|
b2b7e975ad | ||
|
|
91d623419a | ||
|
|
282b9eae81 | ||
|
|
66c63c6dad | ||
|
|
3dc34b50bd | ||
|
|
4aac37401c | ||
|
|
58794cbbb3 | ||
|
|
81cf3f6b3d | ||
|
|
4d56522e44 | ||
|
|
c220fc5b88 | ||
|
|
f5318b9ed6 | ||
|
|
370b800967 | ||
|
|
027b4367fc | ||
|
|
43a31b2713 | ||
|
|
68089f6e7c | ||
|
|
e8e3d1bbfc | ||
|
|
f5c7f2d428 | ||
|
|
5baa3f7625 | ||
|
|
8f8d0c9adf | ||
|
|
b8ca1d44f1 | ||
|
|
007857c13f | ||
|
|
77f9067eaa | ||
|
|
9a2bafeb05 | ||
|
|
748fe11132 | ||
|
|
97653ac481 | ||
|
|
bfeeeb5b40 | ||
|
|
d5afc41b97 | ||
|
|
3d8b7dd696 | ||
|
|
560e48a8b5 | ||
|
|
54b0af377b | ||
|
|
5164a9f963 | ||
|
|
2d2113a8e9 | ||
|
|
5d6950afd9 | ||
|
|
b042b055c4 | ||
|
|
02a525acdb | ||
|
|
c553ef4d60 | ||
|
|
9e203e0d7c | ||
|
|
76038d83e8 | ||
|
|
c21489d304 | ||
|
|
0d37091adf | ||
|
|
0d66cf09ac | ||
|
|
8d875579c5 | ||
|
|
ff9c709787 | ||
|
|
bce88e4d32 | ||
|
|
08542bd09f |
No files matched your search
+12
-12
@@ -25,16 +25,16 @@ jobs:
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v4
|
||||
uses: actions/setup-dotnet@v6
|
||||
|
||||
- name: Build
|
||||
run: dotnet publish DepotDownloader/DepotDownloader.csproj -c ${{ matrix.configuration }} -o artifacts /p:ContinuousIntegrationBuild=true
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
if: matrix.configuration == 'Release' && matrix.runs-on == 'windows-latest'
|
||||
with:
|
||||
name: DepotDownloader-framework
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
run: dotnet publish DepotDownloader/DepotDownloader.csproj --configuration Release -p:PublishSingleFile=true -p:DebugType=embedded --self-contained --runtime osx-arm64 --output selfcontained-osx-arm64
|
||||
|
||||
- name: Upload Windows-x64
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
if: matrix.configuration == 'Release' && matrix.runs-on == 'windows-latest'
|
||||
with:
|
||||
name: DepotDownloader-windows-x64
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Windows-arm64
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
if: matrix.configuration == 'Release' && matrix.runs-on == 'windows-latest'
|
||||
with:
|
||||
name: DepotDownloader-windows-arm64
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Linux-x64
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
if: matrix.configuration == 'Release' && matrix.runs-on == 'ubuntu-latest'
|
||||
with:
|
||||
name: DepotDownloader-linux-x64
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Linux-arm
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
if: matrix.configuration == 'Release' && matrix.runs-on == 'ubuntu-latest'
|
||||
with:
|
||||
name: DepotDownloader-linux-arm
|
||||
@@ -102,7 +102,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Linux-arm64
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
if: matrix.configuration == 'Release' && matrix.runs-on == 'ubuntu-latest'
|
||||
with:
|
||||
name: DepotDownloader-linux-arm64
|
||||
@@ -110,7 +110,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload macOS-x64
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
if: matrix.configuration == 'Release' && matrix.runs-on == 'macos-latest'
|
||||
with:
|
||||
name: DepotDownloader-macos-x64
|
||||
@@ -118,7 +118,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload macOS-arm64
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
if: matrix.configuration == 'Release' && matrix.runs-on == 'macos-14'
|
||||
with:
|
||||
name: DepotDownloader-macos-arm64
|
||||
@@ -131,7 +131,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
@@ -162,7 +162,7 @@ jobs:
|
||||
working-directory: release
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
draft: true
|
||||
files: release/*
|
||||
|
||||
@@ -17,10 +17,10 @@ jobs:
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v4
|
||||
uses: actions/setup-dotnet@v6
|
||||
|
||||
- name: Configure NuGet
|
||||
run: |
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
run: dotnet publish DepotDownloader/DepotDownloader.csproj -c ${{ matrix.configuration }} -o artifacts /p:ContinuousIntegrationBuild=true
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
if: matrix.configuration == 'Release'
|
||||
with:
|
||||
name: DepotDownloader-${{ matrix.runs-on }}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
// This file is subject to the terms and conditions defined
|
||||
// in file 'LICENSE', which is part of this source code package.
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using SteamKit2.Authentication;
|
||||
|
||||
namespace DepotDownloader
|
||||
{
|
||||
// This is practically copied from https://github.com/SteamRE/SteamKit/blob/master/SteamKit2/SteamKit2/Steam/Authentication/UserConsoleAuthenticator.cs
|
||||
internal class ConsoleAuthenticator : IAuthenticator
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public Task<string> GetDeviceCodeAsync(bool previousCodeWasIncorrect)
|
||||
{
|
||||
if (previousCodeWasIncorrect)
|
||||
{
|
||||
Console.Error.WriteLine("The previous 2-factor auth code you have provided is incorrect.");
|
||||
}
|
||||
|
||||
string code;
|
||||
|
||||
do
|
||||
{
|
||||
Console.Error.Write("STEAM GUARD! Please enter your 2-factor auth code from your authenticator app: ");
|
||||
code = Console.ReadLine()?.Trim();
|
||||
|
||||
if (code == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (string.IsNullOrEmpty(code));
|
||||
|
||||
return Task.FromResult(code!);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<string> GetEmailCodeAsync(string email, bool previousCodeWasIncorrect)
|
||||
{
|
||||
if (previousCodeWasIncorrect)
|
||||
{
|
||||
Console.Error.WriteLine("The previous 2-factor auth code you have provided is incorrect.");
|
||||
}
|
||||
|
||||
string code;
|
||||
|
||||
do
|
||||
{
|
||||
Console.Error.Write($"STEAM GUARD! Please enter the auth code sent to the email at {email}: ");
|
||||
code = Console.ReadLine()?.Trim();
|
||||
|
||||
if (code == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (string.IsNullOrEmpty(code));
|
||||
|
||||
return Task.FromResult(code!);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<bool> AcceptDeviceConfirmationAsync()
|
||||
{
|
||||
if (ContentDownloader.Config.SkipAppConfirmation)
|
||||
{
|
||||
return Task.FromResult(false);
|
||||
}
|
||||
|
||||
Console.Error.WriteLine("STEAM GUARD! Use the Steam Mobile App to confirm your sign in...");
|
||||
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Frozen;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -35,6 +36,16 @@ namespace DepotDownloader
|
||||
private const string CONFIG_DIR = ".DepotDownloader";
|
||||
private static readonly string STAGING_DIR = Path.Combine(CONFIG_DIR, "staging");
|
||||
|
||||
private static readonly FrozenSet<EWorkshopFileType> SupportedWorkshopFileTypes = FrozenSet.ToFrozenSet(new[]
|
||||
{
|
||||
EWorkshopFileType.Community,
|
||||
EWorkshopFileType.Art,
|
||||
EWorkshopFileType.Screenshot,
|
||||
EWorkshopFileType.Merch,
|
||||
EWorkshopFileType.IntegratedGuide,
|
||||
EWorkshopFileType.ControllerBinding,
|
||||
});
|
||||
|
||||
private sealed class DepotDownloadInfo(
|
||||
uint depotid, uint appId, ulong manifestId, string branch,
|
||||
string installDir, byte[] depotKey)
|
||||
@@ -246,17 +257,10 @@ namespace DepotDownloader
|
||||
return INVALID_MANIFEST_ID;
|
||||
|
||||
// Either the branch just doesn't exist, or it has a password
|
||||
var password = Config.BetaPassword;
|
||||
|
||||
if (string.IsNullOrEmpty(password))
|
||||
if (string.IsNullOrEmpty(Config.BetaPassword))
|
||||
{
|
||||
Console.WriteLine($"Branch {branch} was not found, either it does not exist or it has a password.");
|
||||
}
|
||||
|
||||
while (string.IsNullOrEmpty(password))
|
||||
{
|
||||
Console.Write($"Please enter the password for branch {branch}: ");
|
||||
Config.BetaPassword = password = Console.ReadLine();
|
||||
Console.WriteLine($"Branch {branch} for depot {depotId} was not found, either it does not exist or it has a password.");
|
||||
return INVALID_MANIFEST_ID;
|
||||
}
|
||||
|
||||
if (!steam3.AppBetaPasswords.ContainsKey(branch))
|
||||
@@ -264,7 +268,7 @@ namespace DepotDownloader
|
||||
// Submit the password to Steam now to get encryption keys
|
||||
await steam3.CheckAppBetaPassword(appId, Config.BetaPassword);
|
||||
|
||||
if (!steam3.AppBetaPasswords.TryGetValue(branch, out var appBetaPassword))
|
||||
if (!steam3.AppBetaPasswords.ContainsKey(branch))
|
||||
{
|
||||
Console.WriteLine($"Error: Password was invalid for branch {branch} (or the branch does not exist)");
|
||||
return INVALID_MANIFEST_ID;
|
||||
@@ -341,22 +345,55 @@ namespace DepotDownloader
|
||||
|
||||
steam3.Disconnect();
|
||||
}
|
||||
|
||||
public static async Task DownloadPubfileAsync(uint appId, ulong publishedFileId)
|
||||
private static async Task ProcessPublishedFileAsync(uint appId, ulong publishedFileId, List<ValueTuple<string, string>> fileUrls, List<ulong> contentFileIds)
|
||||
{
|
||||
var details = await steam3.GetPublishedFileDetails(appId, publishedFileId);
|
||||
var fileType = (EWorkshopFileType)details.file_type;
|
||||
|
||||
if (!string.IsNullOrEmpty(details?.file_url))
|
||||
if (fileType == EWorkshopFileType.Collection)
|
||||
{
|
||||
await DownloadWebFile(appId, details.filename, details.file_url);
|
||||
foreach (var child in details.children)
|
||||
{
|
||||
await ProcessPublishedFileAsync(appId, child.publishedfileid, fileUrls, contentFileIds);
|
||||
}
|
||||
}
|
||||
else if (details?.hcontent_file > 0)
|
||||
else if (SupportedWorkshopFileTypes.Contains(fileType))
|
||||
{
|
||||
await DownloadAppAsync(appId, new List<(uint, ulong)> { (appId, details.hcontent_file) }, DEFAULT_BRANCH, null, null, null, false, true);
|
||||
if (!string.IsNullOrEmpty(details?.file_url))
|
||||
{
|
||||
fileUrls.Add((details.filename, details.file_url));
|
||||
}
|
||||
else if (details?.hcontent_file > 0)
|
||||
{
|
||||
contentFileIds.Add(details.hcontent_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Unable to locate manifest ID for published file {0}", publishedFileId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Unable to locate manifest ID for published file {0}", publishedFileId);
|
||||
Console.WriteLine("Published file {0} has unsupported file type {1}. Skipping file", publishedFileId, fileType);
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task DownloadPubfileAsync(uint appId, ulong publishedFileId)
|
||||
{
|
||||
List<ValueTuple<string, string>> fileUrls = new();
|
||||
List<ulong> contentFileIds = new();
|
||||
|
||||
await ProcessPublishedFileAsync(appId, publishedFileId, fileUrls, contentFileIds);
|
||||
|
||||
foreach (var item in fileUrls)
|
||||
{
|
||||
await DownloadWebFile(appId, item.Item1, item.Item2);
|
||||
}
|
||||
|
||||
if (contentFileIds.Count > 0)
|
||||
{
|
||||
var depotManifestIds = contentFileIds.Select(id => (appId, id)).ToList();
|
||||
await DownloadAppAsync(appId, depotManifestIds, DEFAULT_BRANCH, null, null, null, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,7 +469,7 @@ namespace DepotDownloader
|
||||
|
||||
if (!await AccountHasAccess(appId, appId))
|
||||
{
|
||||
if (await steam3.RequestFreeAppLicense(appId))
|
||||
if (steam3.steamUser.SteamID.AccountType != EAccountType.AnonUser && await steam3.RequestFreeAppLicense(appId))
|
||||
{
|
||||
Console.WriteLine("Obtained FreeOnDemand license for app {0}", appId);
|
||||
|
||||
@@ -549,6 +586,8 @@ namespace DepotDownloader
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
try
|
||||
{
|
||||
await DownloadSteam3Async(infos).ConfigureAwait(false);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||
<RollForward>LatestMajor</RollForward>
|
||||
<Version>3.2.0</Version>
|
||||
<Version>3.4.0</Version>
|
||||
<Description>Steam Downloading Utility</Description>
|
||||
<Authors>SteamRE Team</Authors>
|
||||
<Copyright>Copyright © SteamRE Team 2025</Copyright>
|
||||
@@ -21,12 +21,12 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
|
||||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.363">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="protobuf-net" Version="3.2.52" />
|
||||
<PackageReference Include="QRCoder" Version="1.6.0" />
|
||||
<PackageReference Include="SteamKit2" Version="3.1.0" />
|
||||
<PackageReference Include="protobuf-net" Version="3.4.30" />
|
||||
<PackageReference Include="QRCoder" Version="1.8.1" />
|
||||
<PackageReference Include="SteamKit2" Version="3.4.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -31,5 +31,6 @@ namespace DepotDownloader
|
||||
public uint? LoginID { get; set; }
|
||||
|
||||
public bool UseQrCode { get; set; }
|
||||
public bool SkipAppConfirmation { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -68,21 +68,21 @@ namespace DepotDownloader
|
||||
var password = GetParameter<string>(args, "-password") ?? GetParameter<string>(args, "-pass");
|
||||
ContentDownloader.Config.RememberPassword = HasParameter(args, "-remember-password");
|
||||
ContentDownloader.Config.UseQrCode = HasParameter(args, "-qr");
|
||||
ContentDownloader.Config.SkipAppConfirmation = HasParameter(args, "-no-mobile");
|
||||
|
||||
if (username == null)
|
||||
{
|
||||
if (ContentDownloader.Config.RememberPassword)
|
||||
if (ContentDownloader.Config.RememberPassword && !ContentDownloader.Config.UseQrCode)
|
||||
{
|
||||
Console.WriteLine("Error: -remember-password can not be used without -username.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ContentDownloader.Config.UseQrCode)
|
||||
{
|
||||
Console.WriteLine("Error: -qr can not be used without -username.");
|
||||
Console.WriteLine("Error: -remember-password can not be used without -username or -qr.");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (ContentDownloader.Config.UseQrCode)
|
||||
{
|
||||
Console.WriteLine("Error: -qr can not be used with -username.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
ContentDownloader.Config.DownloadManifestOnly = HasParameter(args, "-manifest-only");
|
||||
|
||||
@@ -350,6 +350,11 @@ namespace DepotDownloader
|
||||
{
|
||||
if (username != null && password == null && (!ContentDownloader.Config.RememberPassword || !AccountSettingsStore.Instance.LoginTokens.ContainsKey(username)))
|
||||
{
|
||||
if (AccountSettingsStore.Instance.LoginTokens.ContainsKey(username))
|
||||
{
|
||||
Console.WriteLine($"Account \"{username}\" has stored credentials. Did you forget to specify -remember-password?");
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
Console.Write("Enter account password for \"{0}\": ", username);
|
||||
@@ -511,6 +516,8 @@ namespace DepotDownloader
|
||||
Console.WriteLine(" -password <pass> - the password of the account to login to for restricted content.");
|
||||
Console.WriteLine(" -remember-password - if set, remember the password for subsequent logins of this user.");
|
||||
Console.WriteLine(" use -username <username> -remember-password as login credentials.");
|
||||
Console.WriteLine(" -qr - display a login QR code to be scanned with the Steam mobile app");
|
||||
Console.WriteLine(" -no-mobile - prefer entering a 2FA code instead of prompting to accept in the Steam mobile app");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine(" -dir <installdir> - the directory in which to place downloaded files.");
|
||||
Console.WriteLine(" -filelist <file.txt> - the name of a local file that contains a list of files to download (from the manifest).");
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace DepotDownloader
|
||||
|
||||
var clientConfiguration = SteamConfiguration.Create(config =>
|
||||
config
|
||||
.WithHttpClientFactory(HttpClientFactory.CreateHttpClient)
|
||||
.WithHttpClientFactory(static purpose => HttpClientFactory.CreateHttpClient())
|
||||
);
|
||||
|
||||
this.steamClient = new SteamClient(clientConfiguration);
|
||||
@@ -265,6 +265,11 @@ namespace DepotDownloader
|
||||
if (requestCode == 0)
|
||||
{
|
||||
Console.WriteLine($"No manifest request code was returned for depot {depotId} from app {appId}, manifest {manifestId}");
|
||||
|
||||
if (!authenticatedUser)
|
||||
{
|
||||
Console.WriteLine("Suggestion: Try logging in with -username as old manifests may not be available for anonymous accounts.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -328,7 +333,11 @@ namespace DepotDownloader
|
||||
|
||||
public async Task<PublishedFileDetails> GetPublishedFileDetails(uint appId, PublishedFileID pubFile)
|
||||
{
|
||||
var pubFileRequest = new CPublishedFile_GetDetails_Request { appid = appId };
|
||||
var pubFileRequest = new CPublishedFile_GetDetails_Request
|
||||
{
|
||||
appid = appId,
|
||||
includechildren = true,
|
||||
};
|
||||
pubFileRequest.publishedfileids.Add(pubFile);
|
||||
|
||||
var details = await steamPublishedFile.GetDetails(pubFileRequest);
|
||||
@@ -437,13 +446,14 @@ namespace DepotDownloader
|
||||
try
|
||||
{
|
||||
_ = AccountSettingsStore.Instance.GuardData.TryGetValue(logonDetails.Username, out var guarddata);
|
||||
authSession = await steamClient.Authentication.BeginAuthSessionViaCredentialsAsync(new SteamKit2.Authentication.AuthSessionDetails
|
||||
authSession = await steamClient.Authentication.BeginAuthSessionViaCredentialsAsync(new AuthSessionDetails
|
||||
{
|
||||
DeviceFriendlyName = nameof(DepotDownloader),
|
||||
Username = logonDetails.Username,
|
||||
Password = logonDetails.Password,
|
||||
IsPersistentSession = ContentDownloader.Config.RememberPassword,
|
||||
GuardData = guarddata,
|
||||
Authenticator = new UserConsoleAuthenticator(),
|
||||
Authenticator = new ConsoleAuthenticator(),
|
||||
});
|
||||
}
|
||||
catch (TaskCanceledException)
|
||||
@@ -465,8 +475,8 @@ namespace DepotDownloader
|
||||
{
|
||||
var session = await steamClient.Authentication.BeginAuthSessionViaQRAsync(new AuthSessionDetails
|
||||
{
|
||||
DeviceFriendlyName = nameof(DepotDownloader),
|
||||
IsPersistentSession = ContentDownloader.Config.RememberPassword,
|
||||
Authenticator = new UserConsoleAuthenticator(),
|
||||
});
|
||||
|
||||
authSession = session;
|
||||
@@ -509,11 +519,17 @@ namespace DepotDownloader
|
||||
if (result.NewGuardData != null)
|
||||
{
|
||||
AccountSettingsStore.Instance.GuardData[result.AccountName] = result.NewGuardData;
|
||||
|
||||
if (ContentDownloader.Config.UseQrCode)
|
||||
{
|
||||
Console.WriteLine($"Success! Next time you can login with -username {result.AccountName} -remember-password instead of -qr.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AccountSettingsStore.Instance.GuardData.Remove(result.AccountName);
|
||||
}
|
||||
|
||||
AccountSettingsStore.Instance.LoginTokens[result.AccountName] = result.RefreshToken;
|
||||
AccountSettingsStore.Save();
|
||||
}
|
||||
@@ -694,10 +710,14 @@ namespace DepotDownloader
|
||||
using var qrGenerator = new QRCodeGenerator();
|
||||
var qrCodeData = qrGenerator.CreateQrCode(challengeUrl, QRCodeGenerator.ECCLevel.L);
|
||||
using var qrCode = new AsciiQRCode(qrCodeData);
|
||||
var qrCodeAsAsciiArt = qrCode.GetGraphic(1, drawQuietZones: false);
|
||||
var qrCodeAsAsciiArt = qrCode.GetLineByLineGraphic(1, drawQuietZones: true);
|
||||
|
||||
Console.WriteLine("Use the Steam Mobile App to sign in with this QR code:");
|
||||
Console.WriteLine(qrCodeAsAsciiArt);
|
||||
|
||||
foreach (var line in qrCodeAsAsciiArt)
|
||||
{
|
||||
Console.WriteLine(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,33 +61,52 @@ For example: `./DepotDownloader -app 730 -ugc 770604181014286929`
|
||||
|
||||
## Parameters
|
||||
|
||||
#### Authentication
|
||||
|
||||
Parameter | Description
|
||||
----------------------- | -----------
|
||||
`-app <#>` | the AppID to download.
|
||||
`-depot <#>` | the DepotID to download.
|
||||
`-manifest <id>` | manifest id of content to download (requires `-depot`, default: current for branch).
|
||||
`-ugc <#>` | the UGC ID to download.
|
||||
`-branch <branchname>` | download from specified branch if available (default: Public).
|
||||
`-branchpassword <pass>` | branch password if applicable.
|
||||
`-all-platforms` | downloads all platform-specific depots when `-app` is used.
|
||||
`-os <os>` | the operating system for which to download the game (windows, macos or linux, default: OS the program is currently running on)
|
||||
`-osarch <arch>` | the architecture for which to download the game (32 or 64, default: the host's architecture)
|
||||
`-all-archs` | download all architecture-specific depots when `-app` is used.
|
||||
`-all-languages` | download all language-specific depots when `-app` is used.
|
||||
`-language <lang>` | the language for which to download the game (default: english)
|
||||
`-lowviolence` | download low violence depots when `-app` is used.
|
||||
`-pubfile <#>` | the PublishedFileId to download. (Will automatically resolve to UGC id)
|
||||
`-username <user>` | the username of the account to login to for restricted content.
|
||||
`-password <pass>` | the password of the account to login to for restricted content.
|
||||
`-remember-password` | if set, remember the password for subsequent logins of this user. (Use `-username <username> -remember-password` as login credentials)
|
||||
`-username <user>` | the username of the account to login to for restricted content.
|
||||
`-password <pass>` | the password of the account to login to for restricted content.
|
||||
`-remember-password` | if set, remember the password for subsequent logins of this user. (Use `-username <username> -remember-password` as login credentials)
|
||||
`-qr` | display a login QR code to be scanned with the Steam mobile app
|
||||
`-no-mobile` | prefer entering a 2FA code instead of prompting to accept in the Steam mobile app.
|
||||
`-loginid <#>` | a unique 32-bit integer Steam LogonID in decimal, required if running multiple instances of DepotDownloader concurrently.
|
||||
|
||||
#### Downloading
|
||||
|
||||
Parameter | Description
|
||||
------------------------ | -----------
|
||||
`-app <#>` | the AppID to download.
|
||||
`-depot <#>` | the DepotID to download.
|
||||
`-manifest <id>` | manifest id of content to download (requires `-depot`, default: current for branch).
|
||||
`-ugc <#>` | the UGC ID to download.
|
||||
`-pubfile <#>` | the PublishedFileId to download. (Will automatically resolve to UGC id)
|
||||
`-branch <branchname>` | download from specified branch if available (default: Public).
|
||||
`-branchpassword <pass>` | branch password if applicable.
|
||||
|
||||
#### Download configuration
|
||||
|
||||
Parameter | Description
|
||||
----------------------- | -----------
|
||||
`-all-platforms` | downloads all platform-specific depots when `-app` is used.
|
||||
`-os <os>` | the operating system for which to download the game (windows, macos or linux, default: OS the program is currently running on)
|
||||
`-osarch <arch>` | the architecture for which to download the game (32 or 64, default: the host's architecture)
|
||||
`-all-archs` | download all architecture-specific depots when `-app` is used.
|
||||
`-all-languages` | download all language-specific depots when `-app` is used.
|
||||
`-language <lang>` | the language for which to download the game (default: english)
|
||||
`-lowviolence` | download low violence depots when `-app` is used.
|
||||
`-dir <installdir>` | the directory in which to place downloaded files.
|
||||
`-filelist <file.txt>` | the name of a local file that contains a list of files to download (from the manifest). prefix file path with `regex:` if you want to match with regex. each file path should be on their own line.
|
||||
`-validate` | include checksum verification of files already downloaded.
|
||||
`-manifest-only` | downloads a human readable manifest for any depots that would be downloaded.
|
||||
`-cellid <#>` | the overridden CellID of the content server to download from.
|
||||
`-max-downloads <#>` | maximum number of chunks to download concurrently. (default: 8).
|
||||
`-loginid <#>` | a unique 32-bit integer Steam LogonID in decimal, required if running multiple instances of DepotDownloader concurrently
|
||||
`-filelist <file.txt>` | the name of a local file that contains a list of files to download (from the manifest). prefix file path with `regex:` if you want to match with regex. each file path should be on their own line.
|
||||
`-validate` | include checksum verification of files already downloaded.
|
||||
`-manifest-only` | downloads a human readable manifest for any depots that would be downloaded.
|
||||
`-cellid <#>` | the overridden CellID of the content server to download from.
|
||||
`-max-downloads <#>` | maximum number of chunks to download concurrently. (default: 8).
|
||||
`-use-lancache` | forces downloads over the local network via a Lancache instance.
|
||||
|
||||
#### Other
|
||||
|
||||
Parameter | Description
|
||||
----------------------- | -----------
|
||||
`-debug` | enable verbose debug logging.
|
||||
`-V` or `--version` | print version and runtime.
|
||||
|
||||
|
||||
Reference in new issue
Block a user