lunes, 3 de enero de 2011

MLDONKEY SERVER.MET

CREAR EL ARCHIVO: server.met.txt
cat server.met.txt

http://www.descargasbajar.com/emule/server.met
http://users.servicios.retecal.es/ljpadillam/Baltab/server.met
http://ed2k.2x4u.de/3vtom2vk/micro/server.met
http://ed2k.2x4u.de/3vtom2vk/min/server.met
http://ed2k.2x4u.de/3vtom2vk/max/server.met
http://ocbmaurice.dyndns.org/pl/slist.pl/server.met?download/server-best.met
http://ocbmaurice.dyndns.org/pl/slist.pl/server.met?download/server-good.met
http://ocbmaurice.dyndns.org/pl/slist.pl/server.met?download/server-max.met
http://trinit.es/server.met
http://www.linuxpourtous.com/server.met
http://upd.emule-security.net/server.met
http://peerates.net/servers.php

SCRIPT PARA CARGAR SERVIDORES:
#! /bin/bash
# Por Paco Aldarias. v.1.2 06.09.2007

# Acceso
usu="miusuario"
pass="micontrasenya"

host="127.0.0.1"
puerto=4000

# Velocidad
lentoup=5
lentodown=0
rapidoup=11
rapidodown=0

#********************
function exportar
# Ejemplo: dllink ed2k://|file|02-Roma_2.avi|474486784|F1DCFAB73A68F1126AFFDC4E1788B295|/
{
>ml.export
#Cogemos los numero de fichero
num=$(echo -e "auth $usu $pass \n vd\nq" | nc 127.0.0.1 4000 | grep "\[D" | awk '{print $2}' | cut -d"]" -f1)
for i in $(echo $num);do
a=$(echo -e "auth $usu $pass \n vd $i \nq" | nc 127.0.0.1 4000 | grep ed2k | cut -c 10-)
# b=$(echo -e "auth $usu $pass \n vd $i \nq" | nc 127.0.0.1 4000 | grep "Probable" | cut -c 16- )
b=$(echo -e "auth $usu $pass \n vd $i \nq" | nc 127.0.0.1 4000 | sed -n 12L | cut -d"]" -f2)
c=$(echo -e "auth $usu $pass \n vd $i \nq" | nc 127.0.0.1 4000 | awk '/Total/ {print $2}')
echo "ed2k://|file|$b|$c|$a|/" >> ml.export
done
echo fichero generado: ml.export
cat ml.export
}

#********************
function importar
{
for i in $(cat ml.export);do
echo -e "auth $usu $pass \n dllink $i \n q" | nc 127.0.0.1 4000
done
}

#*********************
function cancelar
{
echo -e "auth $usu $pass\n cancel $1 \n" | nc 127.0.0.1 4000
}


#*********************
function conectar
{
echo -e "auth $usu $pass\n ? \n" | nc 127.0.0.1 4000
}



#*********************
function help
{
#echo -e "auth $usu $pass\n longhelp \nq" | nc 127.0.0.1 4000

{
sleep 1
echo auth "$usu" "$pass"
sleep 1
echo longhelp
sleep 1
echo q
} | telnet $host $puerto

}

#*********************
function spanish
{
echo -e "auth $usu $pass\n \
s -minsize 524288000 -maxsize 1048576000 -Video -format avi -media Video -not "crack" -not "exe" -not "zip" -not "rar" -not "keygen" -not "crack" "spanish"
\nq" | nc 127.0.0.1 4000
}

#*********************
function comando
{
echo -e "auth $usu $pass \n $1 \n q" | nc 127.0.0.1 4000
}


#*********************
function link
{
echo "telnet 127.0.0.1 4000"
echo "auth $usu $pass"
echo "dllink fichero"
echo -e "auth $usu $pass \n dllink $1 \n q" | nc 127.0.0.1 4000
}

#****************************
function velocidad
{
echo "****************************"
case "$1" in
"rapido")
echo "DOWN: $rapidodown UP: $rapidoup"
echo -e "auth $usu $pass\n \
set max_hard_download_rate $rapidodown \n \
set max_hard_upload_rate $rapidoup \n q" | nc 127.0.0.1 4000
;;
"lento")
echo "DOWN: $lentodown UP: $lentoup"
echo -e "auth $usu $pass\n \
set max_hard_download_rate $lentodown \n \
set max_hard_upload_rate $lentoup \n q" | nc 127.0.0.1 4000
;;
*) echo "Uso: $0 v rapido|lento"
exit 1
;;
esac
}

#********************************
function arranque
{
case "$1" in
"stop")
killall mlnet
;;
"start")
cd /home/paco/.mldonkey/
mlnet &
;;
*) echo "$0 arranque start|stop"
exit 1
;;
esac
}

#***************************
function borrar
{
echo -e "auth $usu $pass \n cancel $1 \n confirm yes \n q" | nc 127.0.0.1 4000
}


#***************************
function descargas
{

{
sleep 1
echo auth "$usu" "$pass"
sleep 1
echo vd
sleep 1
echo q
} | telnet $host $puerto

#echo "auth $usu $pass \n vd \n q" | nc 127.0.0.1 4000
}

#***************************
function propiedades
{
echo -e "auth $usu $pass \n vd $1 \nq" | nc 127.0.0.1 4000
}

#***************************
function puertos
{
echo -e "auth $usu $pass \n portinfo \nq" | nc 127.0.0.1 4000
}


#***************************
function server
{

# Activar update
{
sleep 1
echo "auth $usu $pass"
sleep 1
set update_server_list_server_met true
sleep 1
set update_server_list_server true
sleep 1
set ED2K-update_server_list_server_met true
sleep 1
echo q
} | telnet $host $puerto




d=".mldonkey/server.met"
for i in $(cat server.met.txt);do
rm -f $d
echo "SERVER: ${i}"
wget -O ${d} ${i}
if [ -f ${d} ];then
{
sleep 1
echo "auth $usu $pass"
sleep 1
echo "servers server.met"
sleep 1
echo q
} | telnet $host $puerto

else
echo "No hay descargar"
fi

done
}

#***************************
function server1
{

url="http://ed2k.2x4u.de/mwoaihpx/min/server.met"
wget -O .mldonkey/server.met "$url"
echo -e "auth $usu $pass \n servers server.met \nq" | nc 127.0.0.1 4000

}

#***************************
function guardian
{
rm guarding.p2p.zip
wget \
http://www.openmedia.info/downloads/guarding.p2p.zip
-O guarding.p2p.zip
unzip guarding.p2p.zip
echo -e "auth $usu $pass \n set ip_blocking "guarding.p2p" \nq" | nc 127.0.0.1 4000
}

#***************************
function remb
{
echo -e "auth $usu $pass \n rem blocked \nq" | nc 127.0.0.1 4000
}


#*********************
function opciones
{
echo "Valores:"
echo "RAPIDO. DOWN: $rapidodown UP: $rapidoup"
echo "LENTO. DOWN: $lentodown UP: $lentoup"

echo "opciones:"
echo "0. Salir"
echo "h. Ayuda de comandos"
echo "a. Arranque start/stop"
echo "v. rapido/lento."
echo "d. Descargas"
echo "l. Link ed2k://"
echo "c comando. Comando directo"
echo "p num. Ver propiedades fichero"
echo "b num. Borra fichero"
echo "t. Conectar"
echo "e. Exportar"
echo "i. Importar"
echo "pu. Ver puertos usados"
echo "se. Cargar todos los server.met"
echo "se1. Cargar un server.met"
echo "sp. Buscar spanish"
echo "gu. Guardian p2p"
echo "seb. Borrar servidore bloqued"
}


#**************** MAIN


case "$1" in
0)
exit
;;
b)
borrar $2
;;
p)
propiedades $2
;;
t)
conectar
;;
a)
arranque $2
;;
v)
velocidad $2
;;
d)
descargas
;;
h)
help
;;
c)
comando $2
;;
l)
link "$2"
;;

e)
exportar
;;

i) importar
;;

pu) puertos
;;

se) server
;;

se1) server1
;;

sp) spanish
;;

gu) guardian
;;

seb) remb
;;

*)
echo "SINTASIS: $0 opcion valor"
opciones
exit 1
;;
esac

EJECUTARLO:
bash ml.sh se

No hay comentarios:

Publicar un comentario