| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HumbleBundle has introduced a new guard code, which is sent to the email
address of the account owner after the captcha has been solved.
Unfortunately, the humblebundle-python[1] library is no longer
maintained and there are no forks with fixups. In addition, the code of
the library is sub-par and also doesn't support Python 3.
So I added a patch containing a _very_ dirty fix to include the guard
code during the login procedure for now until we have decided to either
go with the existing library and fork it or use another library or
implement it ourselves, since we only use a tiny fraction of the HB API.
I also fixed up the Qt plugin path for the captcha prompt if a newer
nixpkgs revision is used, where we have wrapQtAppsHook.
One downside of the guard code is that we get prompted for it _every_
time we download something, which might be annoying, but at least it's
better than not working at all.
Signed-off-by: aszlig <aszlig@nix.build>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we're on a machine with remote builds enabled, we'd like to prefer
not having our login credentials to be pushed on a remote server.
We of course also don't want the actual games to end up on a different
machine, so let's use preferLocalBuild to avoid this.
Unfortunately avoidance is not at any cost, because if we for example
use a different system attribute, it might be built on a remote machine
nevertheless. Ideally there would be something like "forceLocalBuild",
which avoids remote builds at any cost.
Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Profpatsch
|
|
|
|
|
|
|
|
|
|
| |
The "Product" model expects to have a "supports_canonical" attribute in
the JSON Product object, which since a while is no longer there.
We really don't need that attribute for our purposes, so we can simply
drop the line where we do the lookup.
Signed-off-by: aszlig <aszlig@nix.build>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The object in question to get the response from the Recaptcha widget is
now called "grecaptcha" instead of just "captcha" and the method to call
now is also called "getResponse" instead of "get_response".
Another change is that the grecaptcha object isn't available immediately
once the page is loaded, so I added a try...catch loop for that. I know
it's evil to do that, but I tried to check just for whether grecaptcha
is available and then call the getResponse method but found out that
during object construction there is a small time window where
getResponse is available but isn't a callable method.
There is still another issue with the HB fetcher, but the first step is
hereby fixed.
Signed-off-by: aszlig <aszlig@nix.build>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every HumbleBundle purchase has a list of subproducts and those have
so-called 'machine_name' attributes which are unique. However in our
fetcher we used the 'human_name' as a unique key, which isn't really
unique and in case of bastion the soundtrack subproduct is has the
human_name "Bastion" and the actual game has the *same* name as well.
Using the machine_name as the unique key now solves the problem that
certain games couldn't be found if you for example also have the
soundtrack.
Signed-off-by: aszlig <aszlig@nix.build>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want this little helper to leave all kinds of junk on the disk,
so let's enable offTheRecord mode for the default QtWebEngine profile.
This in turn causes all stuff like cache, cookies, local storage and
whatnot to only reside in memory.
For example on my machine I had lots of files like this in
~/.local/share and ~/.cache:
* 014bxyklf1xm99jd5rg8y4q0blmqw6yc-get-captcha
* 18j0knrwrsamsrpwjz741midspxbqmpp-get-captcha
* 4817rvjnj249ifvk7dsvv2p0kxi2jwkg-get-captcha
So if you ran this helper you should probably remove *-get-captcha in
XDG_DATA_HOME (by default ~/.local/share) and XDG_CACHE_HOME (by default
~/.cache).
Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Profpatsch, @Sternenseemann, @layus
|
|
|
|
|
|
|
|
|
| |
The login URL for HumbleBundle has changed from /login to /processlogin,
so let's fix it quickly via sed.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Issue: saik0/humblebundle-python#16
Cc: @saik0
|
|
|
|
|
|
|
| |
The requests2 package has been merged into the original project
upstream and thus is deprecated.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is not only a major annoyance for us but seems to bother a few
other people using the humblebundle-python API:
* saik0/humblebundle-python#11
* saik0/humblebundle-python#14
* saik0/humblebundle-python#15
While digging through the reCaptcha2 API and also the implementation of
the Humble Bundle site, I stumbled over this code from
https://www.humblebundle.com/user/captcha:
var captcha = new Recaptcha2('captcha-holder');
$('input[type=submit]').click(function(e){
e.preventDefault();
// recaptcha v2 only cares about response, but we can let the Android app interface stay the same
var challenge = '';
var response = captcha.get_response();
var android_defined = false;
if (typeof Android != 'undefined') {
Android.setCaptchaResponse(challenge, response);
}
})
So we only need the response, which we do now using a very ugly written
Qt 5 QWebEngine GUI which we use to ask the user to solve the captcha.
Combined with our downloader, it works like this:
Whenever the login fails with a HumbleCaptchaException, we print a
message with the store path to the GUI helper. We're inside a
fixed-output derivation builder, so we do have networking.
The GUI helper also runs a small TCP server listening on port 18123 and
the downloader inside the Nix builder constantly tries to connect to
that port and waits until it gets just one string (the connection is
directly closed afterwards and the GUI helper exits), which is the
response. This is then passed as recaptcha_response keyword argument to
the login() method of the HumbleApi object.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit e3f8d28d6be67257d70035d122263f3a35adc438 and my
attempts to mitigate this in 0a50f5fab1abf2e70fd5d7a2dd717c2f2c1b983b
and 3b91f25b37ea709f5c86e38a50061199bbed5341.
Vuizvui is a repository for experimental stuff, but NOT a dumpster. So
please refrain from pushing waste into this repository, like markers for
a failed merge.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @Profpatsch
|
| |
|
|
|
|
|
|
|
| |
Since 771ed59b48bc1257439b4529426cc9047aebc27b, there is no top-level
attribute anymore, so let's fix this.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
|
|
|
|
|
|
|
| |
This should make sure it can be evaluated on NixOS versions where the
closure-size branch has not yet been merged.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
|
|
|
|
|
|
|
| |
Since the merge of the closure-size branch, the curl binary now is in a
dedicated output ".bin".
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
|
|
This is a subtree merge of the full nixgames repository including
history. Right now it isn't linked to vuizvui at all but we're going to
do that very soon.
The reason why I'm merging both repositories together is that it's
easier for me to manage updates and also facilitate contributions by
people from the OpenLab.
Another reason to merge it is that we can write more generic functions
for building both, the games and the rest.
Right now the licensing is still the Apache License version 2.0, but
we're going to change it to the vuizvui license as well.
|