rapidshare/netload/hotfile downloader with web interface

jaco
Posts: 7
Joined: Sat Jan 09, 2010 10:31 pm

rapidshare/netload/hotfile downloader with web interface

Postby jaco » Sun Jan 10, 2010 12:23 am

Hi to all...

A long time ago, I wrote a daemon for WD's My Book World (which runs a busybox linux distro) that downloads files from the internet using libcurl and you can control it via a web interface. You can find it here (http://sourceforge.net/projects/myrapbook/).

Anyway, I started developing the second version which was about to support also netload and hotfile. I re-wrote the whole code as I was C newbie back then, made it more robust etc and when I was about to release it my My Book stopped working. :lol: So I've never finished because I couldn't proceed with the development. Therefore, about 1 week ago while I was searching for a NAS/Home Server/etc solution I've discovered Amahi. Well, I liked the idea of using fedora as base platform as I liked fc5 very much but never used it since then. To make the long story short, I think Amahi is probably the best (and free) home server now in market. Of course, if you don't need the hda virtual domain and the Amahi's web gui and automation, you can do with any distro what Amahi does as it's a collection of other programs and tools under the same hood, but I think it's the people and the community that matters.

So, I've ported the code for fc12 and integrated into Amahi and it works (as far as I know) ok. The web interface looks like that

Image

As I've said you can download any file from Rapidshare/Netload/Hotfile by using cookies only if you have a premium membership.

To install the program you need the following files

http://www.terajunk.com/jaco/myrapbook_exec.tar.gz
http://www.terajunk.com/jaco/myrapbook_ ... ace.tar.gz

I haven't made an installer, therefore you must follow the exact procedure to make it work.

Install mrb (myrapbook - I haven't change the name :p )
1. Create a folder for myrapbook in your /usr/share

Code: Select all

as root mkdir /usr/share/myrapbook
2. Extract the contents of the zip file to the folder (only the contents of the folder in the zip file)
3. Edit mrb.conf file

The only thing that you have to change in the conf.file is the 'DownloaderFolder' parameter and there you have to give the path of the download folder. For example I use a shared folder (available in \\hda) that it's location is in '/data/Unsorted', therefore in my conf file is declared as

Code: Select all

DownloadFolder=/data/Unsorted/
Don't forget the last '/' its critical.

If you do all the above things then by running the program (as root)

Code: Select all

sudo /usr/share/myrapbook/mrb
you should see no errors, except the missing cookies.

Create cookies
To create the cookies that are needed for mrb do the following
1. Get the cookies from your web browsers cache and place them in /usr/share/myrapbook/cookies/
2.

Code: Select all

su cd /usr/share/myrapbook/cookies
Get Rapidshare cookie (USERNAME = your premium account username, PASSWORD = your premium account password)

Code: Select all

curl -k --cookie-jar ./cookies_rapidshare --data "login=USERNAME&password=PASSWORD" https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi > /dev/null
Get Netload Cookie:

Code: Select all

#curl -k --cookie-jar ./cookies_netload --data "txtuser=USERNAME&txtpass=PASSWORD&txtcheck=login&txtlogin=" http://netload.in/index.php > /dev/null
Get Hotfile Cookie:

Code: Select all

curl -k --cookie-jar ./cookies_hotfile --data "returnto=%2F&user=USERNAME&pass=PASSWORD" http://hotfile.com/login.php > /dev/null
Again, you have to change the USERNAME and PASSWORD strings with your premium account's data. Of course, only use the services you have.

Install Web Interface
1. Create the path '/var/hda/web-apps/myrapbook/'
2. Extract the contents of the web interface in there. You should see only two folders (html, logs) in the above path.
3. Open your's hda web interface and from Setup->Apps->Web Apps tab click the 'New Web App >' button. Give as name whatever you want (ie mrb or myrapbook) and '/var/hda/web-apps/myrapbook' for the Root Path. Click create and you're ready.
4. Restart your httpd service
5. Now the web interface should be in "http://myrapbook". mrb program must be running.

Notes
Here I have to say that there are some restrictions for now, as this program is still under testing in Amahi. First the program doesn't fork. Therefore you have to run it as a process in such a way that it won't block any other following executions. For example you can't load it from a script because the script will stop it's execution when it loads the mrb.

Just test it and depending the feedback or my own findings I will do any changes needed. The source is open to anyone, I've just don't know right now what I'm going to do with sourceforge.

I may have mistyped some of the above commands.

Sorry for my pure english. It's not my native language.
Attachments
myrapbook_web_interface.tar.gz
(175.92 KiB) Downloaded 257 times
myrapbook_exec.tar.gz
(26.18 KiB) Downloaded 186 times

User avatar
cpg
Administrator
Posts: 2605
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: rapidshare/netload/hotfile downloader with web interface

Postby cpg » Sun Jan 10, 2010 3:10 pm

niiiice!

how would you like to package it into a one-click app?
we can add you to the contributors group and you can start trying it out!

you can also come by the IRC channel, we can help out (http://talk.amahi.org). we have hooks for installation scripts, webapp, etc. the only thing is the binary code (seems like there is one), which may require packaging as an rpm.

obviously, if you could add some way to ask the user for the credentials, it would take the program to the next level and make it completely generic!
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

jaco
Posts: 7
Joined: Sat Jan 09, 2010 10:31 pm

Re: rapidshare/netload/hotfile downloader with web interface

Postby jaco » Mon Jan 11, 2010 12:24 am

Hi cpg,

thanks for your reply. Of course I'm willing to do any modifications are needed for credentials automation for premium users within the web interface. I will read more information about the one-click-app integration in your wiki and forums and if I find my self stuck I will try the on-line channel. I don't know if it's a problem is that I'm UTC+2 time (I mean for the IRC channel).

Anyway, I'll proceed to any changes are needed and I'll contact again soon.

Regards.

User avatar
cpg
Administrator
Posts: 2605
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: rapidshare/netload/hotfile downloader with web interface

Postby cpg » Mon Jan 11, 2010 12:35 am

hi jaco,

for details, see the application packaging page in the wiki.

It's actually easier than it looks there, believe me!

You can try creating a new app without fear, because only you can see it, as it starts in alpha state.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

jinxytj
Posts: 5
Joined: Thu Dec 17, 2009 9:39 pm

Re: rapidshare/netload/hotfile downloader with web interface

Postby jinxytj » Wed Jan 26, 2011 9:11 am

Hey all,

I will be giving this a go a bit later on :)

I had asked in the forum before about using JDownloader as a web-app for premium hotfile/rapidshare etc, the main problem there was a) you have to have it run in a fake X session, b) control of the web-app is limited c) Difficult to get up and running, and then maintain

This sounds perfect so I would like to put myself forward for testing when the time comes

Thanks in advance

Who is online

Users browsing this forum: No registered users and 2 guests