howtothings.co.uk
[LINUX] Little Sitecloner-Script - Printable Version

+- howtothings.co.uk (https://www.howtothings.co.uk)
+-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4)
+--- Forum: Operating System and Software Support (https://www.howtothings.co.uk/forumdisplay.php?fid=17)
+--- Thread: [LINUX] Little Sitecloner-Script (/showthread.php?tid=1129)



[LINUX] Little Sitecloner-Script - Clones - 13-11-2011

I just want to share a little script which I made.
You can use it to clone websites for offline use of websites or phishing-purposes.
I know that this is not a big thing, but it might be useful for some beginners

Code:
#!bin/sh

# wget Websitecloner-Script

echo Enter URL:
read URL
echo
echo Enter Download-Directory:   # if not existing it will be created
read DD
echo Do you want to clone the whole website or just the index.html? hole/index # type whole for the whole site and index for index.html
read WHOLE
if [ -d "$DD" ]
then
     cd $DD
else
     mkdir $DD
     cd $DD
fi
if $HOLE = whole
then
     wget -r --page-requisites --convert-links -U Mozilla -erobots=off -w 5 $URL
else
     wget --page-requisites --convert-links -U Mozilla -erobots=off -w 5 $URL
fi
echo
echo site cloned