Back to top

Documentación explícita referente a redes, sistemas y seguridad informática.

Categorías


Administración y Seguridad Programación

Tuenti Visits Incrementer

Muchos de vosotros supongo que sabréis lo que es Tuenti. Es una red social tipo Facebook española (en extensión por otros países). La herramienta básicamente sube las visitas del tuenti. ¿Por qué hacer una herramienta tan absurda? por varias razones:

- Mi novia tiene 12.000 visitas más que yo y está todo el día picándome.
- Mis amigos dicen: tú que eres "hacker" (no me considero, que conste), más te valdría hacer algo útil (ejem) como un programa para subirme las visitas del tuenti (ahora me dicen que haga uno para bajarlas jajajajajajaja, lo cual es imposible).
- Hay gente freak que disfrutará mucho teniendo 1.000.000 de visitas falsas xD.
- Me apetecía programar algo con CURL de PHP con conexión por HTTPS, envío de formularios, recepción y utilización de cookies, entre otras cosas.

Al grano: se trata de una herramienta programada en PHP con "interfaz gráfica" por medio de etiquetas HTML y CSS. Para hacerla correr necesitas tener un servidor apache con módulo PHP5, CURL y SSL. La herramienta se conecta a la red social tuenti y busca a tus amigos. Después seleccionas al que quieres y le subes las visitas que quieras. También puedes subirlas directamente desde el menú principal si conoces el user_id de la amiga ó amigo.

El programa:

<?php
/*
**********************************************************************
*
*
* _______ _ _____ __ ___
*|__ __| | | |_ _| /_ | / _ \
* | |_ _ ___ _ __ | |_ | | _ __ ___ __ __ | | | | | |
* | | | | |/ _ \ '_ \| __| | | | '_ \ / __| \ \ / / | | | | | |
* | | |_| | __/ | | | |_ _| |_| | | | (__ \ V / | | _ | |_| |
* |_|\__,_|\___|_| |_|\__| |_____|_| |_|\___| \_/ |_| (_) \___/
*
*
*CREDITS:
*
*Tuenti Visits Incrementer
*
*N-D labs® 2009
*
*Programmed by Sh4v
*
*It requires libcurl for PHP
*
*It requires chmod 777 in cookie path --> chmod -R 777 cookie
*
*Greetz to Pr0x, Protos, Lix, OzX, S[e]C, Seth, Yasión, Dynamique and all members of undersecurity.net
*
*Visit http://n3t-datagrams.net
*
*Enjoy ^^
**********************************************************************
*/
error_reporting(E_NONE);
$phpself=htmlentities($_SERVER['PHP_SELF'], ENT_QUOTES);
session_start();
if (isset($_POST['login']) && $_POST['pass']){
$_SESSION['true']=true;
$_SESSION['login']=$_POST['login'];
$_SESSION['pass']=$_POST['pass'];
$_SESSION['control']=0;
}
if (!isset($_SESSION['true'])){
echo "<html>
<head>
<META HTTP-EQUIV='Content-Type' CONTENT='charset=ISO-8859-1'>
<style type='text/css'>
body{
font-family: Arial;
color: #8ab9df;
background-color: #64a3cf;
}
h1{
margin-left: 0px;
margin-top: 100px;
margin-bottom: -175px;
text-align:center;
font-family: Arial;
color: #025389;
background-color: transparent;
}
h4{
text-align: center;
margin-left: 70px;
margin-top: 5px;
margin-bottom: 0px;
font-family: Arial;
color: #ffffff;
background-color: transparent;
}
h5{
text-align: center;
margin-left: -15px;
margin-top: 0px;
font-family: Arial;
color: #ffffff;
background-color: transparent;
}
img{
border:none;
}
a {text-decoration: none}
a:link {
color: #ffffff; }
a:hover {text-decoration: underline}
a:active{text-decoration: underline}
.especial:link { color: #ffffff; }
</style>
</head>
<title>PHP-Tuenti Login page</title>
<body>
<h1><img src='images/login.png'></h1>
<form action=# METHOD=POST>
<h4><input type='text' name='login' style='width: 175px'><br><br>
<input type='password' name='pass' style='width: 175px'><br><br></h4>
<h5><label><input type='image' name='imageField' src='images/button.png'></label></h5>
</form>";
}else{

function login($usermail, $password){
$tcookie="cookie/cookie";
$ch= curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.tuenti.com/?m=login&func=do_login");
curl_setopt ($ch, CURLOPT_POSTFIELDS, "email=$usermail&input_password=$password&timezone=1");
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_COOKIEFILE, $tcookie);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $tcookie);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.1.5) Gecko/20091105 Fedora/3.5.5-1.fc11 Firefox/3.5.5");

$res=curl_exec ($ch);
curl_close($ch);
return $res;
}

function consult($url){
$tcookie="cookie/cookie";
$ch= curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_COOKIEFILE, $tcookie);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $tcookie);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.1.5) Gecko/20091105 Fedora/3.5.5-1.fc11 Firefox/3.5.5");
$res = curl_exec ($ch);
curl_close($ch);
return $res;
}

if ($_SESSION['control']==0){
$usermail=urlencode($_SESSION['login']);
$password=urlencode($_SESSION['pass']);

$login=login($usermail, $password);
if (strpos($login, "incorrectos")){
echo "<script>alert('Email o contraseña incorrectos. Serás redirigido a la página de inicio.');</script>";
session_destroy();
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; $phpself'>";

}
}
$_SESSION['control']++;
echo "<html>
<head>
<META HTTP-EQUIV='Content-Type' CONTENT='charset=ISO-8859-1'>
<style type='text/css'>
body{
font-family: Arial;
color: #8ab9df;
background-color: #64a3cf;
}
h1{
padding-left: 0px;
font-family: Arial;
color: #025389;
background-color: #64a3cf;
}
h4{
padding-left: 45px;
padding-top: 0px;
font-family: Arial;
color: #ffffff;
background-color: #64a3cf;
}
h9{
padding-left: 0px;
padding-bottom: -20px;
font-family: Arial;
font-size:12px;
color: #ffffff;
background-color: #64a3cf;
}
img{
border:none;
}
a {text-decoration: none}
a:link {
color: #ffffff; }
a:hover {text-decoration: underline}
a:active{text-decoration: underline}
a:visited{color:#ffffff}
.especial:link { color: #ffffff; }
</style>
</head>
<title>PHP-Tuenti Visits Incrementer</title>
<body>";

switch ($opt){

case "visits_inc":
$user_id=htmlentities($_REQUEST['user_id'], ENT_QUOTES);

if (isset($_GET['user_img']) && isset($_GET['user_name'])){
$user_img=htmlentities($_GET['user_img'], ENT_QUOTES);
$user_name=htmlspecialchars(html_entity_decode($_GET['user_name']), ENT_QUOTES, 'ISO-8859-1');
}else{
$in=0;
while ($user_id!= $_SESSION['userid'][$in]){
$in++;
}
$user_name=$_SESSION['nombre'][$in];
$user_img=htmlentities($_SESSION['image'][$in], ENT_QUOTES);
}


echo "<h1><a href='$phpself'><img src='http://estaticosak1.tuenti.com/layout/web2/images/login_logoblue.24292.png'></a>Visits incrementer</h1>";
echo "<h4><hr align='left' width='50%'><b>".$user_name."</b><br /><img src='$user_img'>"."<br>";

if ($_GET['exec']=="true"){
echo "<center><div id='progress' style='position:relative;padding:0px;
width:650px;height:960px;left:25px;'>";
$num=(int)htmlentities($_REQUEST['num'], ENT_QUOTES);
for ($i=0; $i<$num; $i++){
consult("http://www.tuenti.com/?m=Profile&func=index&user_id=$user_id");
echo "<div style='float:left;margin:5px 0px 0px 1px;width:8px;
height:40px;background:#1181cf;color:blue;'> </div>";
flush();
ob_flush();
}
echo "</div></center>";
echo "<script>";
echo "document.getElementById('progress').style.display = 'none';";
echo "</script>";
echo "<form action='?opt=visits_inc&exec=true&user_id=$user_id&user_name=$user_name&user_img=$user_img' METHOD='POST'>
<input type='text' name='num' style='width:50px'>
<input type='submit' name='button' value='Start!' style='width:50px'>
</form><hr align='left' width='50%'><br></h4>";
}else{
echo "<form action='?opt=visits_inc&exec=true&user_id=$user_id&user_name=$user_name&user_img=$user_img' METHOD='POST'>
<input type='text' name='num' style='width:50px'>
<input type='submit' name='button' value='Start!' style='width:50px'>
</form><hr align='left' width='50%'><br></h4>";
}
break;

case "friends_view":

echo "<h1><a href='$phpself'><img src='http://estaticosak1.tuenti.com/layout/web2/images/login_logoblue.24292.png'></a>Friends viewer</h1>";

//sacamos el número de páginas y el número de contactos
$res=consult("http://www.tuenti.com/?m=Search&func=index&name=&scope=friends");
$pag=explode('<span class="active">1 de ', $res);
$pag=explode('</span><span class="first">', $pag[1]);
$pag=(int)$pag[0];
$num=explode('<span class="result">', $res);
$num=explode(' resultados</span>', $num[1]);
$num=(int)$num[0];


//sacamos foto nombre e ID de cada usuario
echo "<center><div id='progress' style='position:relative;padding:0px;
width:650px;height:960px;left:25px;'>";
for ($i=0; $i<=$pag; $i++){

$res2= consult("http://www.tuenti.com/?m=Search&func=index&name=&scope=friends&page_no=$i");
echo "<div style='float:left;margin:5px 0px 0px 1px;width:8px;
height:40px;background:#1181cf;color:blue;'> </div>";
flush();
ob_flush();

//usuario
$usuid= explode('alt="', $res2);
unset($usuid[0]);
unset($usuid[1]);
foreach ($usuid as $value){
$arrus=explode ('" onload="', $value);
if ($arrus[0]!= ''){
$nombre[]=$arrus[0];
}
}
//imagen
$usuimg= explode('<img class="" src="', $res2);
unset($usuimg[0]);
unset($usuimg[1]);
foreach ($usuimg as $value){
$arrim=explode('" alt="', $value);
if ($arrim[0]!= ''){
$image[]=$arrim[0];
}
}

//id
$usuid= explode('<div class="item" id="friend_info_block_', $res2);
unset($usuid[0]);
foreach ($usuid as $value){
$arrid=explode('"><div class="rightInfo"><span class="date">', $value);
if ($arrid[0]!= ''){
$userid[]=$arrid[0];
}
}


}
$_SESSION['nombre']=$nombre;
$_SESSION['image']=$image;
$_SESSION['userid']=$userid;
echo "</div></center>";
echo "<script>";
echo "document.getElementById('progress').style.display = 'none';";
echo "</script>";



echo"<h4>";
for ($i=0; $i<201; $i++){
echo "<b><a href='?opt=visits_inc&user_id=$userid[$i]&exec=false&user_name=$nombre[$i]&user_img=$image[$i]'>".$nombre[$i]."</b><br /><img src='$image[$i]'>"."</a><br>
<hr align='left' width='50%'><br>";
}
echo "</h4>";


break;

case "logout":

session_destroy();
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; $phpself'>";

break;

default:

echo "<h1><a href='$phpself'><img src='http://estaticosak1.tuenti.com/layout/web2/images/login_logoblue.24292.png'></a>GENERAL VIEW</h1>";
echo "<hr align='left' width='50%'><br>";
echo "<pre><a href='$phpself?opt=friends_view' style='text-decoration:none'><h1><img src='images/tlogo.png'> Friends viewer</h1></a>";
echo "<hr align='left' width='35%'><br>";

echo "<form action='$phpself?opt=visits_inc&exec=true' METHOD=POST>";
echo "<h1><label><input type='image' name='imageField' src='http://www.dannyoton.com/domyspace/logo_tuenti.png'></label> Friends incrementer</h1></a>";
echo "<h4>user_id <input type='text' name='user_id' style='width: 80px'><br>
visits <input type='type' name='num' style='width: 80px'><br><br></h4></form>";


echo "<hr align='left' width='35%'><br>";
echo "<a href='$phpself?opt=logout' style='text-decoration:none'><h1><img src='http://www.dannyoton.com/domyspace/logo_tuenti.png'> Logout</h1></pre></a>";
echo "<hr align='left' width='35%'><br>";
break;
}
echo "</body><center><h9>N-D labs®</h9></center></html>";
}
?>



CAPTURAS DE PANTALLA:

Login:


Menú principal:


Listado de amigos:


Aumentador de visitas:


Proceso de aumento de visitas:


Problemas:-> Muchas fotos no las imprime en html debido a no han sido visitados esos perfiles desde hace tiempo. Para poder verlas haría falta hacer un viewsource:http://tuenti.com/ruta/de/la/imagen.jpeg lo cual resulta imposible para los demás casos ya que a la larga acabaría dando muchos más errores de los que genera la aplicación tal cual está.
-------------------------------------------------------------------------------------------

[Actualización]


Nueva versión 2.0. Viene con lo siguiente:

- Problema de imágenes en versión anterior fixeado.
- Incorporación de opción para guardar fotos de la sesión en el directorio "download".
- Incorporación de visor de amigos.
- Incorporación de función para ver fotos de no-amigos tuyos (de normal se te ven como grisaceas en el tuenti y en tamaño pequeño, con esta función podrás verlas al completo aprovechando un fallo de seguridad de tuenti).
- Incorporación de función para descargar fotos de links aunque estas no puedan ser descargadas debido a la configuración de privacidad en el perfil del uploader de la misma.

El source:

<?php
/*
**********************************************************************
*
*
* _______ _ _____ ___ ___
*|__ __| | | |_ _| |__ \ / _ \
* | |_ _ ___ _ __ | |_ | | _ __ ___ __ __ ) | | | | |
* | | | | |/ _ \ '_ \| __| | | | '_ \ / __| \ \ / / / / | | | |
* | | |_| | __/ | | | |_ _| |_| | | | (__ \ V / / /_ _ | |_| |
* |_|\__,_|\___|_| |_|\__|_____|_| |_|\___| \_/ |____| (_) \___/
*
*
*
*CREDITS:
*
*Tuenti Visits Incrementer
*
*N-D labs® 2009
*
*Programmed by Sh4v
*
*It requires libcurl for PHP
*
*It requires chmod 777 in cookie path --> chmod -R 777 cookie
*
*Greetz to Pr0x, Protos, Lix, OzX, S[e]C, Seth, Yasión, Dynamique and all members of undersecurity.net
*
*Enjoy ^^
**********************************************************************
*/

error_reporting(E_NONE);
$phpself=htmlentities($_SERVER['PHP_SELF'], ENT_QUOTES);
session_start();
if (isset($_POST['login']) && $_POST['pass']){
$_SESSION['true']=true;
$_SESSION['login']=$_POST['login'];
$_SESSION['pass']=$_POST['pass'];
$_SESSION['store']=$_POST['photo'];
$_SESSION['control']=0;
}
if (!isset($_SESSION['true'])){
echo "<html>
<head>
<META HTTP-EQUIV='Content-Type' CONTENT='charset=ISO-8859-1'>
<style type='text/css'>
body{
font-family: Arial;
color: #8ab9df;
background-color: #64a3cf;
}
h1{
margin-left: 0px;
margin-top: 100px;
margin-bottom: -175px;
text-align:center;
font-family: Arial;
color: #025389;
background-color: transparent;
}
h4{
text-align: center;
margin-left: 70px;
margin-top: 5px;
margin-bottom: -20px;
font-family: Arial;
color: #ffffff;
background-color: transparent;
}
h5{
text-align: center;
margin-left: -15px;
margin-top: 0px;
font-family: Arial;
color: #ffffff;
background-color: transparent;
}
img{
border:none;
}
a {text-decoration: none}
a:link {
color: #ffffff; }
a:hover {text-decoration: underline}
a:active{text-decoration: underline}
.especial:link { color: #ffffff; }
</style>
</head>
<title>PHP-Tuenti Login page</title>
<body>
<h1><img src='images/login.png'></h1>
<form action=# METHOD=POST>
<h4><input type='text' name='login' style='width: 175px'><br><br>
<input type='password' name='pass' style='width: 175px'><br><br><h4>
<h5><font color='#64a3cf' size='1'>Guardar fotos </font><Input Type='checkbox' value='true' name='photo'><br><label><input type='image' name='imageField' src='images/button.png'></label></h5>
</form>";
}else{

$nombre=array();
$image=array();
$userid=array();

function login($usermail, $password){
$tcookie="cookie/cookie";
$ch= curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.tuenti.com/?m=login&func=do_login");
curl_setopt ($ch, CURLOPT_POSTFIELDS, "email=$usermail&input_password=$password&timezone=1");
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_COOKIEFILE, $tcookie);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $tcookie);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.1.5) Gecko/20091105 Fedora/3.5.5-1.fc11 Firefox/3.5.5");

$res=curl_exec ($ch);
curl_close($ch);
return $res;
}

function consult($url){
$tcookie="cookie/cookie";
$ch= curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_COOKIEFILE, $tcookie);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $tcookie);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.1.5) Gecko/20091105 Fedora/3.5.5-1.fc11 Firefox/3.5.5");
$res = curl_exec ($ch);
curl_close($ch);
return $res;
}

function imagen($route, $dir){
if (isset($dir)){
$dirs="images/download/$dir/";
mkdir($dirs);
chmod($dirs, 0777);
}else{
$dirs="images/download/";
}
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $route);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res=curl_exec($ch);
$name=explode('/',$route);
$name=$dirs.$name[count($name)-1];
$f=fopen($name, 'w+');
fwrite($f, $res);
fclose($f);
$_SESSION['img_control']==true;
return $name;
}

function getinfo($url){
$tcookie="cookie/cookie";
$ch= curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_COOKIEFILE, $tcookie);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $tcookie);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.1.5) Gecko/20091105 Fedora/3.5.5-1.fc11 Firefox/3.5.5");
$res = curl_exec ($ch);
curl_close($ch);

$name=explode("<title>", $res);
$name=explode("</title>", $name[1]);
$name=$name[0];

$image= explode('src="http://imagenes', $res);
unset($image[0]);
unset($image[1]);
$image=explode('" alt="', $image[2]);
$image='http://imagenes'.$image[0];

$output= array($name, $image);
return $output;
}


if ($_SESSION['control']==0){
$usermail=urlencode($_SESSION['login']);
$password=urlencode($_SESSION['pass']);

$login=login($usermail, $password);
if (strpos($login, "incorrectos")){
echo "<script>alert('Email o contraseña incorrectos. Serás redirigido a la página de inicio.');</script>";
session_destroy();
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; $phpself'>";

}
}
$_SESSION['control']++;
echo "<html>
<head>
<META HTTP-EQUIV='Content-Type' CONTENT='charset=ISO-8859-1'>
<style type='text/css'>
body{
font-family: Arial;
color: #8ab9df;
background-color: #64a3cf;
}
h1{
padding-left: 0px;
font-family: Arial;
color: #025389;
background-color: #64a3cf;
}
h4{
padding-left: 45px;
padding-top: 0px;
font-family: Arial;
color: #ffffff;
background-color: #64a3cf;
}
h9{
padding-left: 0px;
padding-bottom: -20px;
font-family: Arial;
font-size:12px;
color: #ffffff;
background-color: #64a3cf;
}
img{
border:none;
}
a {text-decoration: none}
a:link {
color: #ffffff; }
a:hover {text-decoration: underline}
a:active{text-decoration: underline}
a:visited{color:#ffffff}
.especial:link { color: #ffffff; }
</style>
</head>
<title>PHP-Tuenti Visits Incrementer</title>
<body>";

switch ($opt){

case 'download_photo':

echo "<h1><a href='$phpself'><img src='http://estaticosak1.tuenti.com/layout/web2/images/login_logoblue.24292.png'></a>Photo downloader</h1>";
echo "<hr align='left' width='50%'>";
if (!isset($_POST['photo_url'])){
echo "<script>alert('Entrada no autorizada. Serás redirigido.');</script>";
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; $phpself'>";
}else{
$photo_url=str_replace('#', '?', htmlentities($_POST['photo_url'], ENT_QUOTES));
$sub_photo=substr($photo_url, 0, 70);
if ($sub_photo!=htmlentities("http://www.tuenti.com/?m=Photo&func=view_photo&collection_key=", ENT_QUOTES)){
echo "<script>alert('Formato URL incorrecto. Serás redirigido.');</script>";
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; $phpself'>";
}else{
$res=consult(html_entity_decode($photo_url));
if (strpos($res, 'onerror="Photo.navigation.onload_image_error(this);" src="')){
$image_download=explode('onerror="Photo.navigation.onload_image_error(this);" src="', $res);
$image_download=explode('" alt="',$image_download[1]);
$image_download=$image_download[0];
$image_download=imagen($image_download, 'images_downloads');
echo "<img src='$image_download'>";
echo "<h4>You can make right click on the photo and select <i>Save image as</i>.</h4><br>";
}else{
echo "<script>alert('No tienes permisos para ver esta foto. Serás redirigido.');</script>";
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; $phpself'>";
}
}
}

break;

case "friends_friend":

$user_id=htmlentities($_REQUEST['user_id'], ENT_QUOTES);


$input= getinfo("http://www.tuenti.com/?m=Profile&func=index&user_id=$user_id");
$user_name=$input[0];
$user_img=imagen($input[1], $user_id);

if ($user_name==''){
echo "<script>alert('Usuario no permitido!');</script>";
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; $phpself'>";
}else{
echo "<h1><a href='$phpself'><img src='$user_img'></a>Friends of $user_name</h1>";

$res=consult("http://www.tuenti.com/?m=Search&func=index&scope=friends_of_a_friend&other_user=$user_id");
$pag=explode('<span class="active">1 de ', $res);
$pag=explode('</span><span class="first">', $pag[1]);
$pag=(int)$pag[0];
$num=explode('<span class="result">', $res);
$num=explode(' resultados</span>', $num[1]);
$num=(int)$num[0];
//sacamos foto nombre ID y privacidad de cada usuario
echo "<center><div id='progress' style='position:relative;padding:0px;
width:650px;height:960px;left:25px;'>";
for ($i=0; $i<=$pag; $i++){

$res2= consult("http://www.tuenti.com/?m=Search&func=index&scope=friends_of_a_friend&other_user=$user_id&page_no=$i");
echo "<div style='float:left;margin:5px 0px 0px 1px;width:8px;
height:40px;background:#1181cf;color:blue;'> </div>";
flush();
ob_flush();

//usuario
$usuid= explode('alt="', $res2);
unset($usuid[0]);
unset($usuid[1]);
foreach ($usuid as $value){
$arrus=explode ('" onload="', $value);
if ($arrus[0]!= ''){
$nombre[]=$arrus[0];
}
}
//imagen
$usuimg= explode('src="http://imagenes', $res2);
unset($usuimg[0]);
unset($usuimg[1]);
foreach ($usuimg as $value){
$arrim=explode('" alt="', $value);
if ($arrim[0]!= ''){
$arrim[0]="http://imagenes".$arrim[0];
$image[]=imagen($arrim[0]);
}
}

//id
if ($_SESSION['img_control']!= true){
$usuid= explode('<div class="item" id="friend_info_block_', $res2);
unset($usuid[0]);
foreach ($usuid as $value){
$arrid=substr($value,0,8);
$patr=array('"', '>', '<', 'd', 'i', 'v', 's', 'p', 'a');
$arrid=str_replace($patr, '', $arrid);
if ($arrid!= ''){
$userid[]=$arrid;
}
}
}

//privacidad
$usupri= explode('<img class="', $res2);
unset($usupri[0]);
unset($usupri[1]);
foreach ($usupri as $value){
if (substr($value,0,1)== 'r'){
$privacy[]="priv";
}else{
$privacy[]="publ";
}
}

}

echo "</div></center>";
echo "<script>";
echo "document.getElementById('progress').style.display = 'none';";
echo "</script>";

echo"<h4>";
for ($i=0; $i<$num; $i++){
if ($privacy[$i]=="publ"){
echo "<b>".$nombre[$i]."</b><br><img src='".$image[$i]."'>"."<br><a href='?opt=friends_friend&user_id=$userid[$i]'><img src='images/button-friends.png'></a> <a href='?opt=visits_inc&user_id=$userid[$i]&exec=false'><img src='images/button-visits.png'></a> <a href='?opt=shadow_photo&user_id=$userid[$i]&user_name=$nombre[$i]'><img src='images/button-photo.png'></a>"."<br>
<hr align='left' width='50%'><br>";
}else{
echo "<b>".$nombre[$i]."</b><br><img src='".$image[$i]."'>"."<br><a href='?opt=shadow_photo&user_id=$userid[$i]&user_name=$nombre[$i]'><img src='images/button-shadow.png'></a>"."<br>
<hr align='left' width='50%'><br>";
}
}
echo "</h4>";
}
break;

case "friends_view":

echo "<h1><a href='$phpself'><img src='http://estaticosak1.tuenti.com/layout/web2/images/login_logoblue.24292.png'></a>Friends viewer</h1>";

//sacamos el número de páginas y el número de contactos
$res=consult("http://www.tuenti.com/?m=Search&func=index&name=&scope=friends");
$pag=explode('<span class="active">1 de ', $res);
$pag=explode('</span><span class="first">', $pag[1]);
$pag=(int)$pag[0];
$num=explode('<span class="result">', $res);
$num=explode(' resultados</span>', $num[1]);
$num=(int)$num[0];


//sacamos foto nombre privacidad e ID de cada usuario
echo "<center><div id='progress' style='position:relative;padding:0px;
width:650px;height:960px;left:25px;'>";
for ($i=0; $i<=$pag; $i++){

$res2= consult("http://www.tuenti.com/?m=Search&func=index&name=&scope=friends&page_no=$i");
echo "<div style='float:left;margin:5px 0px 0px 1px;width:8px;
height:40px;background:#1181cf;color:blue;'> </div>";
flush();
ob_flush();

//usuario
$usuid= explode('alt="', $res2);
unset($usuid[0]);
unset($usuid[1]);
foreach ($usuid as $value){
$arrus=explode ('" onload="', $value);
if ($arrus[0]!= ''){
$nombre[]=$arrus[0];
}
}
//imagen
$usuimg= explode('<img class="" src="', $res2);
unset($usuimg[0]);
unset($usuimg[1]);
foreach ($usuimg as $value){
$arrim=explode('" alt="', $value);
if ($arrim[0]!= ''){
$image[]=imagen($arrim[0]);
}
}

//id
if ($_SESSION['img_control']!= true){
$usuid= explode('<div class="item" id="friend_info_block_', $res2);
unset($usuid[0]);
foreach ($usuid as $value){
$arrid=explode('"><div class="rightInfo"><span class="date">', $value);
if ($arrid[0]!= ''){
$userid[]=$arrid[0];
}
}
}
}

echo "</div></center>";
echo "<script>";
echo "document.getElementById('progress').style.display = 'none';";
echo "</script>";



echo"<h4>";
for ($i=0; $i<$num; $i++){
echo "<b>".$nombre[$i]."</b><br><img src='$image[$i]'>"."<br><a href='?opt=friends_friend&user_id=$userid[$i]'><img src='images/button-friends.png'></a> <a href='?opt=visits_inc&user_id=$userid[$i]&exec=false'><img src='images/button-visits.png'></a> <a href='?opt=shadow_photo&user_id=$userid[$i]&user_name=$nombre[$i]'><img src='images/button-photo.png'></a>"."<br>
<hr align='left' width='50%'><br>";
}
echo "</h4>";

break;

case "logout":
session_start();
if ($_SESSION['store']=='true'){
rename('images/download', 'images/'.time());
}else{
system('rm -rf images/download');
}
mkdir('images/download');
chmod('images/download', 0777);
session_destroy();
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; $phpself'>";

break;

case "shadow_photo":

$user_id=htmlentities($_REQUEST['user_id'], ENT_QUOTES);
if (isset($_SERVER['http_referer'])){
$referer=htmlentities($_SERVER['HTTP_REFERER']);
}else{
$referer=$phpself;
}
$input= getinfo("http://www.tuenti.com/?m=Profile&func=index&user_id=$user_id");
if ($input[0]!=''){
$user_name=$input[0];
}else{
$res=consult("http://www.tuenti.com/?m=Profile&func=index&user_id=$user_id");
$res=explode('" alt="', $res);
$res=explode('"',$res[2]);
$user_name=$res[0];
}
$user_img=$input[1];
$sub=explode('com/', $user_img);
$sub=explode('/', $sub[1]);
$sub=$sub[0];
$arr=array('imagenes0', 'imagenes1', 'imagenes2', 'imagenes3', 'imagenes4', 'imagenes5', 'imagenes6', 'imagenes7', 'imagenes8', 'imagenes9');
$user_img=str_replace($sub.'/', '', $user_img);
$user_img=str_replace($arr, $sub, $user_img);
$user_img=str_replace('200', '600', $user_img);
$user_img=imagen($user_img, 'sha-'.$user_id);
echo "<h1><a href='$phpself'><img src='http://estaticosak1.tuenti.com/layout/web2/images/login_logoblue.24292.png'></a>Visits incrementer</h1>";
echo "<h4><hr align='left' width='50%'><b>".$user_name."</b><br><img src='$user_img'><br><br><a href='$referer'><img src='images/button-return.png'></a>";

break;

case "visits_inc":
$user_id=htmlentities($_REQUEST['user_id'], ENT_QUOTES);

$input= getinfo("http://www.tuenti.com/?m=Profile&func=index&user_id=$user_id");
$user_name=$input[0];
$user_img=imagen($input[1]);

echo "<h1><a href='$phpself'><img src='http://estaticosak1.tuenti.com/layout/web2/images/login_logoblue.24292.png'></a>Visits incrementer</h1>";
echo "<h4><hr align='left' width='50%'><b>".$user_name."</b><br><img src='$user_img'>"."<br>";

if ($_GET['exec']=="true"){
echo "<center><div id='progress' style='position:relative;padding:0px;
width:650px;height:960px;left:25px;'>";
$num=(int)htmlentities($_REQUEST['num'], ENT_QUOTES);
for ($i=0; $i<$num; $i++){
consult("http://www.tuenti.com/?m=Profile&func=index&user_id=$user_id");
echo "<div style='float:left;margin:5px 0px 0px 1px;width:8px;
height:40px;background:#1181cf;color:blue;'> </div>";
flush();
ob_flush();
}
echo "</div></center>";
echo "<script>";
echo "document.getElementById('progress').style.display = 'none';";
echo "</script>";
echo "<form action='?opt=visits_inc&exec=true&user_id=$user_id' METHOD='POST'>
<input type='text' name='num' style='width:50px'>
<input type='submit' name='button' value='Start!' style='width:50px'>
</form><hr align='left' width='50%'><br></h4>";
}else{
echo "<form action='?opt=visits_inc&exec=true&user_id=$user_id' METHOD='POST'>
<input type='text' name='num' style='width:50px'>
<input type='submit' name='button' value='Start!' style='width:50px'>
</form><hr align='left' width='50%'><br></h4>";
}

break;

default:

echo "<h1><a href='$phpself'><img src='http://estaticosak1.tuenti.com/layout/web2/images/login_logoblue.24292.png'></a>GENERAL VIEW</h1>";
echo "<hr align='left' width='50%'><br>";
echo "<pre><a href='$phpself?opt=friends_view' style='text-decoration:none'><h1><img src='images/tlogo.png'> Friends viewer</h1></a>";
echo "<hr align='left' width='35%'><br>";

echo "<form action='$phpself?opt=visits_inc&exec=true' METHOD=POST>";
echo "<h1><label><input type='image' name='imageField' src='http://www.dannyoton.com/domyspace/logo_tuenti.png'></label> Visits incrementer</h1></a>";
echo "<h4>user_id <input type='text' name='user_id' style='width: 80px'><br>
visits <input type='type' name='num' style='width: 80px'><br><br></h4></form>";

echo "<hr align='left' width='35%'><br>";
echo "<form action='$phpself?opt=friends_friend' METHOD=POST>";
echo "<h1><label><input type='image' name='imageField' src='http://www.dannyoton.com/domyspace/logo_tuenti.png'></label> Friends of friend viewer</h1></a>";
echo "<h4>user_id <input type='text' name='user_id' style='width: 80px'><br>
<br></h4></form>";

echo "<hr align='left' width='35%'><br>";
echo "<form action='$phpself?opt=shadow_photo' METHOD=POST>";
echo "<h1><label><input type='image' name='imageField' src='http://www.dannyoton.com/domyspace/logo_tuenti.png'></label> View shadow photo</h1></a>";
echo "<h4>user_id <input type='text' name='user_id' style='width: 80px'><br>
<br></h4></form>";

echo "<hr align='left' width='35%'><br>";
echo "<form action='$phpself?opt=download_photo' METHOD=POST>";
echo "<h1><label><input type='image' name='imageField' src='http://www.dannyoton.com/domyspace/logo_tuenti.png'></label> Download forbidden photos</h1></a>";
echo "<h4>URL <input type='text' name='photo_url' style='width: 500px'><br>
<br></h4></form>";

echo "<hr align='left' width='35%'><br>";
echo "<a href='$phpself?opt=logout' style='text-decoration:none'><h1><img src='http://www.dannyoton.com/domyspace/logo_tuenti.png'> Logout</h1></pre></a>";
echo "<hr align='left' width='35%'><br>";
break;
}
echo "<br><hr align='center' width='75%'><br></body><center><h9>N-D labs®</h9></center></html>";
}
?>


Descargar:
http://n3t-datagrams.net/downloads/TuentInc_V-2.0.zip

_________________________________________________________________________________
Todavía no hay comentarios. ¡Anímate y se el primero!

Nombre:

Web:

Comentario:


N3t-Datagrams® is programmed by Sh4v and designed by Pr0x.

Políticas

Aviso legal | Advisories