Metalnem / bandcamp-downloader

Command line tool to download albums from your Bandcamp collection
MIT License
4 stars 0 forks source link

Can't sign in #1

Closed Mortbertjh closed 2 months ago

Mortbertjh commented 3 months ago

I'm trying to use this tool but i'm having problems, specifically:

Unhandled exception: System.Exception: Max number of login attempts exceeded. at Api.Client.Login(String username, String password) in C:\Users\crisv\Downloads\Compressed\bandcamp-downloader-main\Api\Client.cs:line 129 at Api.Client.GetCollection(Dictionary`2 queryString) in C:\Users\crisv\Downloads\Compressed\bandcamp-downloader-main\Api\Client.cs:line 99 at Api.Client.GetCollection()+MoveNext() in C:\Users\crisv\Downloads\Compressed\bandcamp-downloader-main\Api\Client.cs:line 79 at Api.Client.GetCollection()+System.Threading.Tasks.Sources.IValueTaskSource.GetResult() at BandcampDownloader.Program.List(String username, String password) in C:\Users\crisv\Downloads\Compressed\bandcamp-downloader-main\BandcampDownloader\Program.cs:line 40 at BandcampDownloader.Program.List(String username, String password) in C:\Users\crisv\Downloads\Compressed\bandcamp-downloader-main\BandcampDownloader\Program.cs:line 40 at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>cDisplayClass4_0.<b0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass17_0.<b0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass12_0.<b0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass22_0.<b0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass19_0.<b0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b18_0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass16_0.<b0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b5_0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<b__0>d.MoveNext()

Virusmater commented 3 months ago

Same, after 2nd attempt to login with X-Bandcamp-Dm header, Bandcamp doesn't respond with X-Bandcamp-Pow

Metalnem commented 3 months ago

Fixed! Please try again and let me know how it goes.

Virusmater commented 3 months ago

Nice, I can log in now. Did Bandcamp change their login routine and you had to reverse engineer the new apk again?

Metalnem commented 2 months ago

There are three different algorithms to calculate X-Bandcamp-Dm header and they are based on different hash functions: SHA1, SHA256, and SHA512. When I first wrote this tool, Bandcamp servers were using the SHA256-based algorithm, so I reverse engineered only that specific algorithm. It appears that they recently switched back to SHA1, so I had to reverse that one, too. If they switch to SHA512, the tool will break again, but I can easily reverse engineer that one if needed.