MadMakz
/
Misc-Tools
Archived
1
0
Fork 0

Added BASH: wget for Rapidshare

This commit is contained in:
MadMakz 2012-10-14 16:01:56 +02:00
parent 8b90d2dbc0
commit ec7178a8fb
2 changed files with 14 additions and 2 deletions

12
BASH/wget-rapidshare.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
###
## Usage: ./<script> <user> <login> <downloadlist>
##
## Note: Requires RS User account and setting "Direct Downloads" set to yes.
###
rapidshare_cookie=`wget -q -O - --post-data="sub=getaccountdetails&withcookie=1&login=$1&password=$2" https://api.rapidshare.com/cgi-bin/rsapi.cgi | grep cookie | cut -d= -f2`
for i in $( cat $3); do
wget --header="Cookie: enc=$rapidshare_cookie" $i
done

View File

@ -58,8 +58,8 @@ function file_get_contents_curl($url, $agent = "My Agent"){
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_URL, $url);
$data = curl_exec($ch);
$data = curl_exec($ch);
$header = curl_getinfo($ch);
curl_close($ch);