Tuesday, October 26, 2010

Download Rapidshare and Megaupload files from the Linux Terminal

To download any Rapidshare and Megaupload file from the Linux terminal, you will need to install an application called 'plowshare'. You can get it from HERE.

Before using plowshare, you should install these packages first:

curl
recode
imagemagick
tesseract-ocr
rhino
aview
PerlMagick

Since I'm using Ubuntu, I downloaded and installed those packages using this one-liner:

$ sudo apt-get install curl recode imagemagick tesseract-ocr-eng rhino aview perlmagick

Now that everything is set, you could start downloading Rapidshare and Megaupload files using the Linux terminal. Here are some usage examples:

Downloading a file from Rapidshare:

$ plowdown http://www.rapidshare.com/files/12345678/Elephants_Dream.rar

Downloading a file from Megaupload (with free membership account):

$ plowdown -a myusername:mypassword http://www.megaupload.com/?d=12345678

Downloading a password-protected file from Megaupload:

$ plowdown -p somepassword http://www.megaupload.com/?d=swf1g53x

For other usage examples, you may go HERE.

It is worth noting that plowshare also supports other file-sharing services such as 2Shared, 4Shared, ZShare, Badongo, Divshare.com, Depositfiles, Mediafire, Netload.in, Storage.to, Uploaded.to, Uploading.com, Sendspace, and Usershare. Source: http://www.junauza.com

Usage examples

All four scripts share the same verbose options: -v0 (alias: -q), -v1 (errors only), -v2 (infos message; default), -v3 (show all messages).

Download

  • Download a file from Rapidshare:
$ plowdown http://www.rapidshare.com/files/86545320/Tux-Trainer_25-01-2008.rar
  • Download a list of links (one link per line):
$ plowdown file_with_links.txt
  • Download a list of links (one link per line) commenting out (with #) those successfully downloaded:
$ plowdown -m file_with_links.txt
  • Limit the download rate (you can use curl rates: K=Kbps, M=Mbps, G=Gbps):
$ plowdown -r 50K http://www.rapidshare.com/files/86545320/Tux-Trainer_25-01-2008.rar
  • Download a file from Megaupload using a free membership account (note ':' is used to separate user from password):
$ plowdown -a myuser:mypassword http://www.megaupload.com/?d=132348234
  • Download a password-protected file from Megaupload:
$ plowdown -p somepassword http://www.megaupload.com/?d=ieo1g52v
  • Use a different web retriever for the last file download. File URL, file name and cookies are available through interpolations. Let's say you want to use wget:
$ plowdown --run-download='wget -O "%filename" --load-cookies "%cookies" "%url"' http://www.2shared.com/file/4446939/c9fd70d6/Test.html
  • Filter alive links in a text file
$ plowdown -c file_with_links.txt > file_with_active_links.txt

Upload

  • Upload a file to the Rapidshare collector zone
$ plowup --auth-freezone=myuser:mypassword /path/myfile.txt rapidshare
  • Upload a file to Rapidshare anonymously changing uploaded file name:
$ plowup /path/myfile.txt rapidshare:anothername.txt
  • Upload a file to Megaupload with a free membership account:
$ plowup -a myuser:mypassword -d "My description" /path/myfile.txt megaupload
  • Upload a file to Megaupload with a premium account and multifetch upload:
$ plowup -a myuser:mypassword -d "My description" --multifetch http://www.somewherefarbeyond.com/somefile megaupload
  • Upload a bunch of files (anonymously to 2shared):
$ plowup /path/myphotos/* 2shared
Notice that only files will be sent, subdirectories will be ignored.
Be aware that curl is not capable of uploading files containing a comma (,) in their name, so make sure to rename them before using plowup.

Delete

  • Delete a file from megaupload (a premium account may be required):
$ plowdel -a myuser:mypassword http://www.megaupload.com/?d=132348234

List

  • List links contained in a shared-folder link and download them all safely:
$ plowlist http://www.mediafire.com/?sharekey=79ac821ea0110 > links.txt
$ plowdown -m links.txt