You are not logged in.
I've written a drop in replacement for hib-dlagent in python that uses the undocumented API (mostly, anyways). It's quite a bit faster as it logs in, fetches and parses about 30 orders in about 8 seconds by doing them all async. Also, I dont think there are any captchas.
I've not tested it extensively and it's pretty hacky right now, but I could clean it up if there is interest in it.
Last edited by saik0 (2014-06-07 00:41:32)
Offline
Definitely. Clean it up, let's see how well it works.
All the best,
-HG
Offline
For whatever reason yesterday it wasn't requiring any captcha challenges, yet today it is. After delving a little deeper i now know there's no way around it, even the android app requires one to login...sometimes. Though I'm not sure why only sometimes.
I'll have to come up with a way of opening a browser, letting the user solve the captcha, and sending the challenge/response codes back to the script. Yay =\
Edit: It's actually not that bad. I can request a new challenge(s) using HB's public key, then fetch the image for the challenge and show it to the user. The response is just the text of the image, both the challenge id and response get posted to HIB's server along with the login creds for verification. It's just a matter of presenting the image to the user.
Last edited by saik0 (2014-06-07 20:47:33)
Offline
Edit: It's actually not that bad. I can request a new challenge(s) using HB's public key, then fetch the image for the challenge and show it to the user. The response is just the text of the image, both the challenge id and response get posted to HIB's server along with the login creds for verification. It's just a matter of presenting the image to the user.
If you are using python, then sdl2 with pysdl2 might work. Then you can display in xorg or a framebuffer.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Online
If you are using python, then sdl2 with pysdl2 might work. Then you can display in xorg or a framebuffer.
Sure, there's a few ways to do it. I was mostly concerned with introducing more dependencies. Now we need to be able to decode jpg and display it to the user and ask for input, in what was originally intended to be a console-only script that requires no user interaction.
I'm thinking of having a separate login sub command like `hibget login` that logs in and stores the session cookie, and letting the download fail-fast if the cookie is invalid. It would be a simple GUI that lets the user enter and optionally store their login creds and solve a captcha. Thoughts?
Last edited by saik0 (2014-06-07 23:01:04)
Offline
https://aur.archlinux.org/packages/hibget/
At the moment no captcha or two factor auth. You dont need to specify username and password on the command line, it can read from a config file. If it's not saved in config or passed as arg it will prompt for them (and ask if you want to store in the config). see hibget --help for options
Offline
Just published 0.0.2 to the AUR, the api changed. Finding a file is much faster now though, 2-6 seconds to find a file in my library of 32 orders.
Offline