mirror of
https://github.com/SteamRE/DepotDownloader.git
synced 2026-10-19 15:51:50 +00:00
Add -no-mobile
This commit is contained in:
1 parent
8d875579c5
commit
0d66cf09ac
5 files changed
+105
-25
No files matched your search
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,5 +31,6 @@ namespace DepotDownloader
|
|||||||
public uint? LoginID { get; set; }
|
public uint? LoginID { get; set; }
|
||||||
|
|
||||||
public bool UseQrCode { get; set; }
|
public bool UseQrCode { get; set; }
|
||||||
|
public bool SkipAppConfirmation { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,6 +68,7 @@ namespace DepotDownloader
|
|||||||
var password = GetParameter<string>(args, "-password") ?? GetParameter<string>(args, "-pass");
|
var password = GetParameter<string>(args, "-password") ?? GetParameter<string>(args, "-pass");
|
||||||
ContentDownloader.Config.RememberPassword = HasParameter(args, "-remember-password");
|
ContentDownloader.Config.RememberPassword = HasParameter(args, "-remember-password");
|
||||||
ContentDownloader.Config.UseQrCode = HasParameter(args, "-qr");
|
ContentDownloader.Config.UseQrCode = HasParameter(args, "-qr");
|
||||||
|
ContentDownloader.Config.SkipAppConfirmation = HasParameter(args, "-no-mobile");
|
||||||
|
|
||||||
if (username == null)
|
if (username == null)
|
||||||
{
|
{
|
||||||
@@ -511,6 +512,7 @@ namespace DepotDownloader
|
|||||||
Console.WriteLine(" -remember-password - if set, remember the password for subsequent logins of this user.");
|
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(" 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(" -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();
|
||||||
Console.WriteLine(" -dir <installdir> - the directory in which to place downloaded files.");
|
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).");
|
Console.WriteLine(" -filelist <file.txt> - the name of a local file that contains a list of files to download (from the manifest).");
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ namespace DepotDownloader
|
|||||||
Password = logonDetails.Password,
|
Password = logonDetails.Password,
|
||||||
IsPersistentSession = ContentDownloader.Config.RememberPassword,
|
IsPersistentSession = ContentDownloader.Config.RememberPassword,
|
||||||
GuardData = guarddata,
|
GuardData = guarddata,
|
||||||
Authenticator = new UserConsoleAuthenticator(),
|
Authenticator = new ConsoleAuthenticator(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (TaskCanceledException)
|
catch (TaskCanceledException)
|
||||||
|
|||||||
@@ -65,41 +65,42 @@ For example: `./DepotDownloader -app 730 -ugc 770604181014286929`
|
|||||||
|
|
||||||
Parameter | Description
|
Parameter | Description
|
||||||
----------------------- | -----------
|
----------------------- | -----------
|
||||||
`-username <user>` | the username of the account to login to for restricted content.
|
`-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.
|
`-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)
|
`-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
|
`-qr` | display a login QR code to be scanned with the Steam mobile app
|
||||||
`-loginid <#>` | a unique 32-bit integer Steam LogonID in decimal, required if running multiple instances of DepotDownloader concurrently.
|
`-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
|
#### Downloading
|
||||||
|
|
||||||
Parameter | Description
|
Parameter | Description
|
||||||
----------------------- | -----------
|
------------------------ | -----------
|
||||||
`-app <#>` | the AppID to download.
|
`-app <#>` | the AppID to download.
|
||||||
`-depot <#>` | the DepotID to download.
|
`-depot <#>` | the DepotID to download.
|
||||||
`-manifest <id>` | manifest id of content to download (requires `-depot`, default: current for branch).
|
`-manifest <id>` | manifest id of content to download (requires `-depot`, default: current for branch).
|
||||||
`-ugc <#>` | the UGC ID to download.
|
`-ugc <#>` | the UGC ID to download.
|
||||||
`-pubfile <#>` | the PublishedFileId to download. (Will automatically resolve to UGC id)
|
`-pubfile <#>` | the PublishedFileId to download. (Will automatically resolve to UGC id)
|
||||||
`-branch <branchname>` | download from specified branch if available (default: Public).
|
`-branch <branchname>` | download from specified branch if available (default: Public).
|
||||||
`-branchpassword <pass>` | branch password if applicable.
|
`-branchpassword <pass>` | branch password if applicable.
|
||||||
|
|
||||||
#### Download configuration
|
#### Download configuration
|
||||||
|
|
||||||
Parameter | Description
|
Parameter | Description
|
||||||
----------------------- | -----------
|
----------------------- | -----------
|
||||||
`-all-platforms` | downloads all platform-specific depots when `-app` is used.
|
`-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)
|
`-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)
|
`-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-archs` | download all architecture-specific depots when `-app` is used.
|
||||||
`-all-languages` | download all language-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)
|
`-language <lang>` | the language for which to download the game (default: english)
|
||||||
`-lowviolence` | download low violence depots when `-app` is used.
|
`-lowviolence` | download low violence depots when `-app` is used.
|
||||||
`-dir <installdir>` | the directory in which to place downloaded files.
|
`-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.
|
`-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.
|
`-validate` | include checksum verification of files already downloaded.
|
||||||
`-manifest-only` | downloads a human readable manifest for any depots that would be 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.
|
`-cellid <#>` | the overridden CellID of the content server to download from.
|
||||||
`-max-downloads <#>` | maximum number of chunks to download concurrently. (default: 8).
|
`-max-downloads <#>` | maximum number of chunks to download concurrently. (default: 8).
|
||||||
`-use-lancache` | forces downloads over the local network via a Lancache instance.
|
`-use-lancache` | forces downloads over the local network via a Lancache instance.
|
||||||
|
|
||||||
#### Other
|
#### Other
|
||||||
|
|||||||
Reference in new issue
Block a user