Showing posts with label command line. Show all posts
Showing posts with label command line. Show all posts

Tuesday, March 24, 2009

a command line tool to download files from rapidshare in Linux


this is a useful simple tool to download files from rapidshare without visual tools. it's perfect if you want download files on your home pc from your office.
you need a valid premium account on rapidshare and wget installed on your pc. to install it: as root yum install wget

create a new directory in your home directory (not as root!):
cd /home/your_user_name
mkdir .cookies
save a cookie in this folder with the following commands:
wget \
--save-cookies ~/.cookies/rapidshare \
--post-data "login=USERNAME&password=PASSWORD" \
-O - \
https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi \
/dev/null

copy and paste the following code and save it as "catchall"

#! /bin/bash
f=`date +%Y-%m-%d_%Hh%Mm%Ss`$RANDOM$RANDOM.log
if [ "$#" = "0" ]
then
echo url missing
else
a="$@"
wget -b -a $f --load-cookies ~/.cookies/rapidshare $a
fi

make it executable and copy it under /usr/bin: as root chmod +x catchall then cp catchall /usr/bin

in your Premium-Zone Settings set as true the option "Direct downloads, requested files are saved without redirection via RapidShare"

now you can download any rapidhare file with the command: catchall your_rapidshare_url_here

you'll get a different log file for each downloaded file. you can see the status of your download with this command: tail -f log_file_name

Friday, March 20, 2009

ctorrent: command line bittorrent client for Fedora

CTorrent is a BitTorrent Client written in C that doesn't require any graphical component, such as an X server.
To install it on Fedora: as root yum install ctorrent

Basic commands: ctorrent -p <port_number> -U <rate_max_upload_Kb> -D <rate_max_download_Kb> <file.torrent>

It's useful to simplify the command with the alias command
If you need to launch it from a remote connection I suggest to use screen command