You are not logged in.

#1 2014-06-07 00:41:13

saik0
Member
Registered: 2012-08-14
Posts: 11

Replacement for hib-dlagent

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

#2 2014-06-07 00:42:51

HalosGhost
Forum Fellow
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,097
Website

Re: Replacement for hib-dlagent

Definitely. Clean it up, let's see how well it works.

All the best,

-HG

Offline

#3 2014-06-07 20:01:39

saik0
Member
Registered: 2012-08-14
Posts: 11

Re: Replacement for hib-dlagent

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

#4 2014-06-07 21:25:30

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Replacement for hib-dlagent

saik0 wrote:

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 ' |

Offline

#5 2014-06-07 22:56:52

saik0
Member
Registered: 2012-08-14
Posts: 11

Re: Replacement for hib-dlagent

progandy wrote:

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

#6 2014-06-21 05:10:11

saik0
Member
Registered: 2012-08-14
Posts: 11

Re: Replacement for hib-dlagent

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

#7 2014-09-03 13:22:09

saik0
Member
Registered: 2012-08-14
Posts: 11

Re: Replacement for hib-dlagent

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

Board footer

Powered by FluxBB