jueves, 24 de marzo de 2011

Generador de enlaces de descargas desde Series Yonkis

Shell + PHP ->Herramientas usadas
Necesitas tener instalado PHP
  • sudo apt-get install php5-cli
Instalación:
series
#!/bin/bash
####
echo "Introduzca el nombre de la serie"
read serie
echo "Introduzca el numero de temporada"
read temporada
echo "Numero de enlaces a mostrar"
read numEnlaces
#####
cd /tmp/
wget "http://www.seriesyonkis.com/serie/"$serie"/" -e robots=off --user-agent="movil Mozilla/5.0 (X11; U; Linux i686; es-CL; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13" -O $serie &>/dev/null
cat $serie | awk -F'>' '/^a href/{split($1,F,"\"");print F[2],$NF}' RS='<' &> $serie".enlaces"
grep $temporada"x" $serie".enlaces" &> $serie
egrep -o "http:.*/ " $serie &> $serie".enlaces"
echo $serie" "$temporada" Comienza la descarga"
contador=1
for capitulo in $(cat $serie."enlaces"); do
    wget $capitulo -e robots=off --user-agent="movil Mozilla/5.0 (X11; U; Linux i686; es-CL; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13" -O "capitulo" &>/dev/null
    cat "capitulo" | awk -F'>' '/^a href/{split($1,F,"\"");print F[2],$NF}' RS='<' &> "capitulo.enlaces"
    grep "DESCARGAR DE megaupload" "capitulo.enlaces" &> "capitulo"
    egrep -o "http:.*" capitulo | cut -d " " -f1 | head -n$numEnlaces &> "capitulo.enlaces"
    echo $serie" Capitulo "$contador
    for enlace in $(cat "capitulo.enlaces"); do
    echo -n "http://www.megaupload.com/?s=seriesyonkis&d="
        php5 /usr/bin/cleaner_series $enlace
        echo "&confirmed=1"
    done
    rm "capitulo"
    rm "capitulo.enlaces"
    let contador=contador+1
    done
rm $serie
rm $serie".enlaces"
exit 0
 Pastebin http://pastebin.com/CKt3LqCh

cleaner_series

<?php
    function hola($a){
        $d = $a;
        $e = 900+101+43-27-1000;
        $f = "";
        $e +=23+100+114;
        for ($i=0; $i<strlen($d); $i++){
            $f .= chr($e^ ord($d[$i]));
        }
        return $f;
    }
   
    for ($i=1; $i<$argc; $i++){
        $hola = $argv[$i];
        $hola = explode("/",$hola);
        $hola = $hola[6];
        echo hola(urldecode($hola));
    }
?>
Pastebin http://pastebin.com/SLrJzk9W

Guardamos los 2 archivos en el Escritorio y abrimos un terminal
  • chmod 777 series
  • chmod 777 cleaner_series
  • sudo mv series /usr/bin/
  • sudo mv series/usr/bin/
Abrimos un terminal escribimos series y pedirá los datos 1 - Nombre de la serie (Ha de ser el mismo que en series yonkis) 2- la temporada  y 3- El número de enlaces (con 1 basta)

Si esto te parece muy raro o eres un vago redomado utiliza este método:
Este pack incluye 3 scripts, el de series yonkis(2) y el de película aleatoria en divx.info
  • wget www.mma-clips.com/zeyt/series/instalador
  • chmod 777 instalador
  • ./instalador
Listo!
Un saludo!

Series Yonkis - n.js ¿Qué hace?

Esto es lo que usa series yonkis para joder a los robots ya que suelen tener complicada la descarga. En cualquier caso yo lo usé como método rápido de conseguir enlaces frescos para bajar temporadas
var qs = location.search.substring(1);
var nv = qs.split('&');
var url = new Object();
var aux = "AAAAAAAA";

if (location.pathname.split('/').length == 6) {
    aux = location.pathname.split('/')[4]
}
for (i = 0; i < nv.length; i++) {
    eq = nv[i].indexOf('=');
    url[nv[i].substring(0, eq).toLowerCase()] = unescape(nv[i].substring(eq + 1))
}
function urlencode(a) {
    return escape(a).replace('+', '%2B').replace('%20', '+').replace('*', '%2A').replace('/', '%2F').replace('@', '%40')
}
function decrypt_str(a) {
    var b = a;
    var c = 254;
    var d = "";
    for (i = 0; i < b.length; i++) {
        d += String.fromCharCode(c ^ b.charCodeAt(i))
    }
    return d
}
function _utf8_decode(a) {
    var b = "";
    var i = 0;
    var c = c1 = c2 = 0;
    while (i < a.length) {
        c = a.charCodeAt(i);
        if (c > -128) {
            b += String.fromCharCode(c);
            i++
        } else if ((c > 191) && (c < 224)) {
            c2 = a.charCodeAt(i + 1);
            b += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
            i += 2
        } else {
            c2 = a.charCodeAt(i + 1);
            c3 = a.charCodeAt(i + 2);
            b += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
            i += 3
        }
    }
    return b
}
function ccM(a, c) {
    var d = a;
    var e = 900 + 101 + 43 - 27 - 1000;
    var f = "";
    var g = 0;
    var h = 0;
    var b = 0;
    e += 23 + 100 + 114;
    for (i = 0; i < d.length; i++) {
        g = e ^ d.charCodeAt(i);
        if (e > 1) {
            f += String.fromCharCode(g * 1)
        } else {
            f += String.fromCharCode(2 * g)
        }
    }
    return f
}
function cc(a) {
    var c = a;
    var d = 900 + 101 + 43 - 27 - 1000;
    var e = "";
    var f = 0;
    var g = 0;
    var b = 0;
    d += 23 + 100;
    for (i = 0; i < c.length; i++) {
        f = d ^ c.charCodeAt(i);
        if (c.length == 12 || i == c.length * 31 || i == c.length * 1 - 1 || i == c.length * 9 + 3) {
            g = f;
            f += 4;
            g--;
            f -= 9
        } else if (i > 0 && d > 1) {
            b = i * 3;
            while (b > 25) {
                b -= 4
            }
            f = 1 - b + f - 2
        }
        if (d > 1) {
            e += String.fromCharCode(f * 1)
        } else {
            e += String.fromCharCode(2 * f)
        }
    }
    return e
}
function sy1() {
    if (aux.length < 24) {
        aux = urlencode(url.id)
    }
    aux = ccM(_utf8_decode(unescape(aux)));
    var a = aux;
    var b = a.split(":");
    var c = 0;
    for (c = 0; c < b.length; c++) {
        if (b.length > 1) {
            document.write("<br /><span style='font-size: 1.5em'><font color='#FF0000'><b>Parte " + (c + 1) + "/" + b.length + "</b></font></span><br />");
            document.write('<h3><img src="http://images.peliculasyonkis.com/images/tdescargar2.png" title="Descargar" alt="Descargar" style="vertical-align: middle;" /><a href="http://www.megaupload.com/es/?d=' + b[c] + '">DESCARGAR PARTE ' + (c + 1) + ' DESDE MEGAUPLOAD</a></h3>');
            document.write("<br />")
        } else {
            document.write("<br /><h1><a target='_blank' href='http://www.megaupload.com/?s=seriesyonkis&d=" + a + "&confirmed=1'>DESCARGAR EL VIDEO <br />DESDE MEGAVIDEO (REQUIERE ESPERA)</a></h1>");
            document.write("<br /><h3><a target='_blank' href='http://www.megaupload.com/?s=seriesyonkis&d=" + a + "&confirmed=1'>http://www.megaupload.com/?s=seriesyonkis&d=" + a + "&confirmed=1</a></h3>")
        }
    }
}
Como siempre pastebin http://pastebin.com/ZHMTq5q4 Paso seguidos http://donzeyt.blogspot.com/2011/03/java-script-wget-no-rompamosnos-la.html

Que os cunda!

Java Script Wget ? No! - Rompamosnos la cabeza.

Digamos que tenemos un código javascript empaquetado, lo sabemos porque empieza por algo así eval(function((p)(a)(c)(k)(e)(r)){ de Dean Edwards

Pues muy fácil:
1- Ir a
http://dean.edwards.name/packer/

 2- Pegar en el navegador esto
javascript:for%20(i=0;i<document.forms.length;++i)%20{for(j=0;j<document.forms[i].elements.length;++j){document.forms[i].elements[j].removeAttribute(%22readonly%22);document.forms[i].elements[j].removeAttribute(%22disabled%22);}}

3- Pegar el código ofuscado

4-Limpiarlo
http://jsbeautifier.org/

5-PROFIT!

Un saludo!


sábado, 5 de marzo de 2011

MYSQL: Funciones útiles

Ucase en MYSQL
  • UPDATE `tabla` SET `campo` =CONCAT(UCASE(SUBSTRING(`campo`, 1, 1)),LOWER(SUBSTRING(`campo`, 2)));
Str_replace en MYSQL
  • UPDATE `tabla` SET campo=REPLACE(tabla.campo, 'busqueda','reemplazo')
Espero que os sirvan!

martes, 1 de marzo de 2011

Script para ver películas

Aquí os dejo un script que os recomienda aleatoriamente una película y os la abre en el firefox si la elegís. Es un buen sistema para esos días que da pereza escoger y navegar! Enlace PasteBin

#!/bin/bash
    OP=1
    cd /tmp/
    while [ $OP -eq 1 ]
    do
   
        VALOR=`echo $(($RANDOM%9999))`
        wget http://www.divxonline.info/pelicula/$VALOR/Pambufering-All-Day-Long/ &>/dev/null
        cat index.html | egrep "<title>(.)*</title>" | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'
        rm index.html
        echo "1 para byscar otra"
        read OP
        if [ $OP -ne 1 ]; then
            firefox http://www.divxonline.info/pelicula/$VALOR/Pambufering-All-Day-Long/
        fi
    done