Skip to content
WJunction - Webmaster Forum

[Unninished ] Link grabber ,Downloader , etc

Status
Not open for further replies.
[Unfinished ] Link grabber ,Downloader , etc

Hey guys,
this is an unfinished project :( , because of lack of time..
thought of sharing it , as others can modify and update it.. <3


PHP:
#!/bin/bash   
## desiboy
## sat_cse28 ( download hf links using wget )
## http://www.gnu.org/licenses/gpl-2.0.html


function quit {
exit
}


function crawlnclean {
echo Grabbing the Hotfile Links
curl curl --silent $1 > 1.lx
cat 1.lx | grep '[hH][tT][tT][pP]:\/\/[hH][oO][tT][fF][iI][lL][eE]\.com' > 2.lx
sed -e 's/<[^>]*>//g' 2.lx > 3.lx
sed -e 's/overflow: auto">//g' 3.lx > 4.lx
sed -e 's/^[ \t]*//' 4.lx > 5.lx
sed -e 's/iMDB | NFO | Samples 1 2 3 4 | Video Sample //' 5.lx > 6.lx
sed -e 's/Code: Select All | Check this link//' 6.lx > 7.lx 
sed -e '/^[ \t]*$/d' 7.lx > links.txt
rm *.lx
echo Grabbed Links from $1 
}

## Download Hotfile links using  wget by sat_cse28 from wjunction

function hfget {
wget --save-cookies cookie --post-data "returnto=%2F&user=yourusername&pass=yourpass&=Login" -O - http://www.hotfile.com/login.php > /dev/null
echo Downloading the hotfile links
wget -c --load-cookies cookie -i links.txt

}

echo Please, enter the URL to be leeched 
read targeturl
crawlnclean $targeturl
hfget
quit
so this when executed will ask you to input the link of the forum post/ blog post etc, and it grabs the download links and downloads them ..
any one is free to alter it further ..
users with lil knowledge of the shell can easily do some nice additions ;)

[SLIDE]http://cdnpic.com/out.php/i10242_screenshot-17sep10-03-01.png[/SLIDE]
[SLIDE]http://cdnpic.com/out.php/i10243_screenshot-17sep10-03-02.png[/SLIDE]

Hint : http://www.wjunction.com/showthread.php?t=32893
http://www.wjunction.com/showthread.php?t=35148

sorry for typo in thread title ..
 

10 comments

shell scripting is awesome and one of the main reasons why I prefer linux over anyother. You can do so much. This is a good start btw and ill give it a test when I switch comps.

Reg Expressions are annoying but good job :P
 
I've never done shell scripting :( not on linux actually lol :P

but i think the script can be taken up by a few linux-based-people. Regex seem to be easier in shell scripting than php lol
 
shell scripting is awesome and one of the main reasons why I prefer linux over anyother. You can do so much. This is a good start btw and ill give it a test when I switch comps.

Reg Expressions are annoying but good job :P

same here =)
once we lern regex, we can do many things :)

I've never done shell scripting :( not on linux actually lol :P

but i think the script can be taken up by a few linux-based-people. Regex seem to be easier in shell scripting than php lol

I hope some will fork this, btw I will add some code daily to this :P and will try to update..
 
first thing i spotted was the fact that you have wriiten a 4 char function to execute a 4 char funtion lol.

Why would you write
PHP:
function quit{
exit
}

so you can call quit instead of exit.... puzzled :/
 
first thing i spotted was the fact that you have wriiten a 4 char function to execute a 4 char funtion lol.

Why would you write
PHP:
function quit{
exit
}
so you can call quit instead of exit.... puzzled :/


:)) to show the usage of functions in bash :P

I can just modify the function for more operations in future ..
example:
I will add
sleep 10


function quit{
sleep 10
exit
}


which will make the script to pause for 10 seconds before it exits ..
 
added the code which can download files from HF , by used sat_cse28.

Now this can leech a thread/post with hf links and can download the files..
next update may be extracting the files and repacking ..

[slide]http://cdnpic.com/upload/3dd1e28d.png[/slide]
 
added the code which can download files from HF , by used sat_cse28.

Now this can leech a thread/post with hf links and can download the files..
next update may be extracting the files and repacking ..

[slide]http://cdnpic.com/upload/3dd1e28d.png[/slide]
Wooooo, you downloaded the file from WarezBlog.org! :D
 
cyberjet's site <3

@shadow.prx : true , lol ..I am using Faenza Dark :D and its very cool :D

btw for others who want to use this script ..

just create a new file , lets say 1.sh
and place the above code and give it executable permissions

chmod +x 1.sh

and replace yourusername andyourpass with your HF user and pass ..

run the script

bash 1.sh

or ./1.sh

it will ask you to input the url of theblog/ forum to leech from..and it does the rest ;)


btw, this leeches links without any problems from wordpress blogs, vBulletin and even IPB
 
Status
Not open for further replies.

About the author

D
Senior Member · Joined
coding in php and python
1,544
Messages
7
Reactions
38
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom