12/10/2011, 05:45 PM
|
#41 (permalink) |
|
Banned
Posts: 91
|
It is linked, but it is also possible to patch advanced browser (haven't tried myself, but it *should* be possible due to nature of patch) ... eventually I could add support for Advanced Browser into install.sh script (and uninstall) ... but for v0.0.5 current priority is to add support for login/password prompt so it will be possible to download files using 'http://<username>:<password>@server/rest/of/the/url' ... which should cover pages that don't use persistent cookies, but http authentication instead
|
12/10/2011, 08:28 PM
|
#42 (permalink) | |
|
Member
![]()
Posts: 14
|
Quote:
[ -f /etc/palm-build-info ] || exit 1 echo remount / as rw mount -o rw,remount / echo Part I CONF=/etc/jail_cookies.conf cp /etc/jail_hybrid.conf $CONF echo "mkdir /var/palm" >> $CONF echo "mkdir /var/palm/data" >> $CONF echo "mount ro /var/palm/data" >> $CONF echo Part II [ -f /usr/palm/applications/com.palm.app.browser/source/BrowserApp.js.orig ] || cp /usr/palm/applications/com.palm.app.browser/source/BrowserApp.js /usr/palm/applications/com.palm.app.browser/source/BrowserApp.js.orig cp BrowserApp.js /usr/palm/applications/com.palm.app.browser/source/BrowserApp.js echo remount / as ro mount -o ro,remount / echo Part III ipkg remove -o /media/cryptofs/apps xx.downloader ipkg install -o /media/cryptofs/apps xx.downloader_0.0.4_all.ipk echo Done Still no luck..but I think the https username/password issue is what was preventing me from logging on to my school website....thanks for working on this. I tried installing IPK directly and when it opened it read "Target URL missing". Last edited by touchpadmd1203; 12/10/2011 at 08:43 PM. |
|
12/11/2011, 03:36 AM
|
#43 (permalink) | |
|
Banned
Posts: 91
|
Quote:
Here is example log: Code:
root@TP:/media/internal# unzip downloader-0.0.4.zip Archive: downloader-0.0.4.zip creating: downloader/ inflating: downloader/install.sh inflating: downloader/BrowserApp.js inflating: downloader/xx.downloader_0.0.4_all.ipk inflating: downloader/uninstall.sh root@TP:/media/internal# cd downloader/ root@TP:/media/internal/downloader# ./install.sh remount / as rw Part I Part II remount / as ro Part III Removing package xx.downloader from root... Begin installation of xx.downloader Installing xx.downloader (0.0.4) to root... Configuring xx.downloader Done root@TP:/media/internal/downloader# |
|
12/11/2011, 09:29 AM
|
#45 (permalink) | |
|
Member
![]()
Posts: 14
|
Quote:
Will do today and update you. Thanks so much. MB |
|
12/11/2011, 12:04 PM
|
#46 (permalink) |
|
Member
![]()
Posts: 4
|
devwithoutpower,
I don't have administrative access (I am a student) therefore I cannot test persistent cookies; i also found no alternative after logging into blackboard to change this setting. I also updated to version .0.0.5 of your patch and still no luck. Even when entering username and pass, i still get {"error" : "script error"} |
12/11/2011, 09:24 PM
|
#48 (permalink) |
|
Member
![]()
Posts: 14
|
GETTING CLOSER!!
DOWNLOADER LAUNCHED BUT THE USERNAME AND PWORD THAT COMES UP..is that for the site or the one I have for my touchpad. If I bypass it then pdf just spins and document does not open... Now I can get to some documents but most stuff open up within the frame and it doesnt prompt me to download. I am using carmen.osu.edu. EXAMPLE: https://carmen.osu.edu/d2l/lms/conte...58&tId=4183090 Last edited by touchpadmd1203; 12/11/2011 at 09:41 PM. |
12/12/2011, 06:38 AM
|
#49 (permalink) | ||
|
Banned
Posts: 91
|
Quote:
Quote:
|
||
12/12/2011, 02:05 PM
|
#50 (permalink) | |
|
Banned
Posts: 91
|
Quote:
|
|
12/12/2011, 02:10 PM
|
#51 (permalink) | |
|
Banned
Posts: 91
|
Quote:
|
|
12/12/2011, 09:33 PM
|
#52 (permalink) |
|
Member
![]()
Posts: 4
|
v0.0.6 still not working with blackboard, but different error message this time.
Here is what the downloader app reads: Target: http://(username) : (password)@blackboard.bu.edu:80/courses/1/11fallengbe401_a1/content/_1081280_1/Project3.pdf?bsession=10741832&bsession_str=session_id=10741832,user_id_pk1=458718,user_id_sos_id_pk 2=1,one_time_token.... (gets cut off) Warning: Failed to create the file Warning: Project3.pdf? bsession=10741832&bsession_str=session_id=10741832,user_i Warning: d_pk1=458718,user_id_sos_id_pk2=1,one_time_token=: Invalid argument curl: (23) Failed writing body (0 != 1402) |
12/13/2011, 05:22 AM
|
#53 (permalink) |
|
Member
![]()
Posts: 8
|
Well, in finally tried... (waited some new releases
)And it works in my case ! Thanks a lot DWP ![]() I installed 0.06 with Xterm/Xecutah and the website that wasn't working was : ICHEC Campus and iCampus (which are using the same platform actually: "claroline" Claroline . NET - Home ) It is the equivalent in Belgium of your blackboard i think
|
12/13/2011, 07:17 AM
|
#54 (permalink) | |
|
Banned
Posts: 91
|
Quote:
I will add support for this kind of pages - BUT I will only provide generic template - maybe with some how-to add your own server (or any other server that requires login first). If someone has test account or knows about some public server where I can register - please send me so I have more testing places... |
|
12/13/2011, 07:30 AM
|
#55 (permalink) |
|
Member
![]()
Posts: 14
|
Thanks for all your work on this devwithoutpower. I will try v0.6. How do I uninstall v0.5 ...via Webos or Xterm. I had a hard time figuring out the command for "unsintall.sh" to do its function. Thanks again for your work on this. I am so surprised it hasnt received more attention.
|
12/13/2011, 07:48 AM
|
#56 (permalink) | |
|
Banned
Posts: 91
|
Quote:
|
|
12/13/2011, 01:30 PM
|
#57 (permalink) | |
|
Member
![]()
Posts: 14
|
Quote:
|
|
12/13/2011, 04:39 PM
|
#58 (permalink) |
|
Banned
Posts: 91
|
So I spent some time investigating downloads from sites that does not store credentials in persistent cookies ... GOOD NEWS - I was able to download file from command line ... BAD NEWS - it is really complicated and most probably each site would require few trial-error steps ...
For better understanding - this is what was required to download ZIP file attached to this thread (when no persistent cookies are stored on device already) 1. try to download file (will fail because login is required first) curl http://forums.webosnation.com/attach...ader-0.0.6.zip This will return HTML page where you have to find POST form ... either manually or with help of little perl script called 'formfind' 2. extract needed form attributes in this case (output from formfind): Code:
--- FORM report. Uses POST to URL "/login.php?do=login" Input: NAME="do" VALUE="login" (HIDDEN) Input: NAME="url" VALUE="/attachment.php?attachmentid=62850" (HIDDEN) Input: NAME="vb_login_md5password" (HIDDEN) Input: NAME="vb_login_md5password_utf" (HIDDEN) Input: NAME="s" VALUE="e9f1fdae0c04f8947856b1464a0b46b0" (HIDDEN) Input: NAME="securitytoken" VALUE="guest" (HIDDEN) Input: NAME="vb_login_username" (TEXT) Input: NAME="vb_login_password" (PASSWORD) Input: NAME="cookieuser" VALUE="1" (CHECKBOX) Button: "Log in" (SUBMIT) --- end of FORM <form action="/login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)"> <script type="text/javascript" src="http://cdn-forums.precentral.net/clientscript/vbulletin_md5.js?v=387"></script> So we need to actually run JavaScript from commandline before we can send login data to server! We could use SpiderMonkey (after doing some quick reverse engineering you will end up with something like this): var vb_login_password = { value: "your password here" }; var vb_login_md5password = {}; var vb_login_md5password_utf = {}; var hash = md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0); print("vb_login_password="+vb_login_password.value); print("vb_login_md5password="+vb_login_md5password.value); print("vb_login_md5password_utf="+vb_login_md5password_utf.value); Luckily for us this is standard MD5 so we dont really need JS runtime in this particular case. 4. POSTing login data to server curl -d vb_login_username="devwithoutpower" -d vb_login_password="" -d cookieuser=0 -d securitytoken=guest -d -d vb_login_md5password=ac94d33dd04368c6421f0edb6949ffa6 -d vb_login_md5password_utf=ac94d33dd04368c6421f0edb6949ffa6 -d url=/attachment.php?attachmentid=62850 -d do=login http://forums.webosnation.com/login.php?do=login Almost there ... you will notice from saved file that this is still no the right one ... as there is redirection used ... 5. getting the real file curl -L -b bbsessionhash=66a6cc704c20420757ff27f64a1a2274 http://forums.webosnation.com/attach...hmentid=62850& -J -O Here is complete script that will automate everything - $1 and $2 are parameters passed on commandline - url and password (username is hardcoded): Code:
URL=$1
MD5=`echo -n $2 | md5sum | awk '{ print $1 }'`
curl $URL > first.out
SEED=`cat first.out | ./formfind | grep -e "^Input: NAME=\"s\" VALUE=" | head -1 | awk -F "\"" '{ print $4 }'`
DST=`cat first.out | ./formfind | grep -e "^Input: NAME=\"url\" VALUE=" | head -1 | awk -F "\"" '{ print $4 }'`
curl -D headers.out -L -d vb_login_username="devwithoutpower" -d vb_login_password="" -d cookieuser=0 -d securitytoken=guest -d s=$SEED -d vb_login_md5password=$MD5 -d vb_login_md5password_utf=$MD5 -d url="$DST" -d do=login http://forums.webosnation.com/login.php?do=login > second.out
rm first.out
U2=`cat second.out | grep -e "URL=" | awk -F "URL=" '{ print $2 }' | awk -F "\"" '{ print $1 }'`
rm second.out
HASH=`cat headers.out | grep bbsessionhash | awk -F "=" '{ print $2 }' | awk -F ";" '{ print $1 }'`
rm headers.out
curl -L -b bbsessionhash=$HASH $U2 -J -O
Sorry for long post - but I wanted to make sure that you understand that getting secured downloads is always doable, but sometimes very tricky. And there is almost no chance to make it generic for all different servers / sites... |
12/14/2011, 08:51 PM
|
#59 (permalink) |
|
Member
![]() |
Okay, we're getting closer!
Old version uninstalled as easily as it installed, and the new one behaved just as well. Also, I was able to download files from one of my sites with an ip address. Excellent. Some tweaking things that I experienced, however: 1.) Name field defaults to a capital letter, and the only way to get lower-case is to type it twice and delete the first one. This is a pain with servers that are case-sensitive 2.) On the other site I use, the password has an '@' in it, throwing an error that it cannot resolve <password>@xx.xx.xxx.x...which means the downloader won't work there. (this might be the "special characters" issue mentioned in the OP.) 3.) Would be fantastic if it could save login info. Almost there - keep up the great work! |
01/02/2012, 10:36 AM
|
#60 (permalink) |
|
Member
![]() |
Just got a chance to revisit this issue. I downloaded and unzipped the file [0.0.6] to my PC, then connected to my TP and copied it over, then used WOSQI to run the unstall, then reset and went to BB to test it... and it worked! [would be nice if it was a patch, or allowed passing password, or gave an option of where to download it] but it works! and that is great!!!
__________________
IIIXE>Clie:N710C>N760C>NX60>Treo[600>650>700]>Centro>Pre+>Pre2&Touchpad 32GB webOS Themes: star-trek-universe star-trek-future Future Trek for Tpad My CV: http://visualcv.com/egadgetguy Last edited by e-gadget-guy; 01/02/2012 at 10:43 AM. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



