#Opciones de esta versión
$ODESC = 'English version 1.0 [en]'; #Para la ayuda
$OOPTS = '-t 2 -nc -nH -w 1 --random-wait -r -k -p -R ad.*.*,ads.*.*'; #Opciones de WGET para leechear
$OLANG = '--header="Accept-Language: en,es;q=0.5"'; #Accept-Language
$OCHAR = '--header="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3"'; #Accept-Charset
$OUSER = '-U "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616"'; #User-Agent
$OBAKA = ''; #Para ejecutar en la ayuda, uso interno
#Verificar argumentos y mostrar ayuda
if ($#ARGV < 1 || int(@ARGV[1]) < 1) {
eval $OBAKA;
print 'LEECH v1.0 - Download a website using WGET
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Usage: LEECH URL depth [<option> [<option> [...]]]
URL Address to start leeching
depth Depth (minimum = 1)
<option>: (also lowercase)
/V=x Limits speed to x (bytes, uses KB if it ends in k, MB if in m)
/P=x Prefix x for all directories that will need to be created
/N Does not recurse upper directories (parents)
/H Also jumps to other hosts
/R=x Sets HTTP referrer to x
/C Disables server-side cache (Pragma: No-cache)
<WGET> Any WGET option (see wget --help)
system ($a);
This is Perl BTW. Name it leech.pl under Windows (and add .PL to PATHEXT and Perl's bin directory to PATH); add #!/usr/bin/perl and name it leech under *nix.