Client para Lavvos (Segura, e Rápida) 14.10.14 17:33
Olá, disponibilizo Hoje uma client que fiz. Ela é:
: Segura: Pois usa um Gerador de Tickets mais Robusto
: Segura: Pois é programada em bom PHP
: Segura: Pois usa PDO e Prepared Statements
: Rápida: Pois é pequena e usa Pouco Código
: E Muito Mais
:Configuração: Fique atento na Parte do Javascript, troque as Palavras pelos Valores Certos :)
Aqui vai:
Créditos
bi0s
Bug
Remova o
: Segura: Pois usa um Gerador de Tickets mais Robusto
: Segura: Pois é programada em bom PHP
: Segura: Pois usa PDO e Prepared Statements
: Rápida: Pois é pequena e usa Pouco Código
: E Muito Mais
:Configuração: Fique atento na Parte do Javascript, troque as Palavras pelos Valores Certos :)
Aqui vai:
- Código:
<?php
/*
/* the bi0s foundation
/* Lavvos Secure, Faster, And Dynamically Client
/* Maked by bi0s
*/
/*
/* Erase the Variables (For Mod_Global)
*/
$tab[b][/b]le = 0;
$quefa = 0;
$column = 0;
$myrealip = 0;
$params = 0;
/*
/* Start the Session Handeling
*/
session_start();
/*
/* Makes Database Connection
*/
// For Lavvos
@include_once('./data_classes/server-data.php_data_classes-config.php.php');
$port = $port ? $port : '3306';
$host = $MySQLhostname ? $MySQLhostname : 'localhost';
$name = $MySQLdb ? $MySQLdb : 'habbo';
$pass = $MySQLpassword ? $MySQLpassword : 'pass';
$user = $MySQLusername ? $MySQLusername : 'root';
// Try to Connect
if ($pass != NULL)
$conn = new PDO("mysql:host={$host};port={$port};dbname={$name}", $user, $pass);
else
$conn = new PDO("mysql:host={$host};port={$port};dbname={$name}", $user);
/*
/* function: getUserIP
/* Get's the User Real IP Using Server Variables
*/
function GetUserIP()
{
if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR']))
{
if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') > 0)
{
$addr = explode(",", $_SERVER['HTTP_X_FORWARDED_FOR']);
return trim($addr[0]);
}
else
{
return $_SERVER['HTTP_X_FORWARDED_FOR'];
}
}
else
{
return $_SERVER['REMOTE_ADDR'];
}
}
/* end of the function */
/*
/* function: getRealID
/* Get's the Real Session ID Identifier
*/
function GetRealID()
{
$idnormalize = (isset($_SESSION['id'])) ? $_SESSION['id'] : 'false';
if($idnormalize != 'false' && is_int($idnormalize))
return htmlentities(stripslashes($_SESSION['id']));
else
header("Location ../");
}
/* end of the function */
/*
/* function: GetTicket
/* Get's A Better Unique Ticket ID
*/
function GetTicket()
{
$data = "habbo-";
for ($i = 1; $i <= 6; $i++)
{
$data = $data . rand(0, 9);
}
$data = $data . "-";
for ($i = 1; $i <= 20; $i++)
{
$data = $data . rand(0, 9);
}
$data = $data . "-hotel-";
for ($i = 1; $i <= 2; $i++)
{
$data = $data . rand(0, 9);
}
$data = $data . "-";
$data = $data . rand(0, 9);
return $data;
}
/* end of the function */
/*
/* function: dbTicket
/* Get's User Ticket and Update Him
*/
function dbTicket($params, $conn)
{
try
{
$result = $conn->prepare("UPDATE users SET auth_ticket = ':ticket' WHERE id = ':userid' ");
$result->bindParam(':userid', $userid);
$result->bindParam(':ticket', $ticket);
$userid = $params[0];
$ticket = $params[1];
$result->execute();
}
catch (PDOException $ex)
{
print "Error in Handle the Query. ";
die();
}
}
/* end of the function */
$myrealip = GetUserIP();
$userid = GetRealID();
$ticket = GetTicket();
$params[0] = $userid;
$params[1] = $ticket;
dbTicket($params, $conn);
/* end of the PHP Code */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<title>Client</title>
<!-- Java Scripts -->
<script src="LINK_HOTEL/web-gallery/client/js/libs2.js" type="text/javascript"></script>
<script src="LINK_HOTEL/web-gallery/client/js/visual.js" type="text/javascript"></script>
<script src="LINK_HOTEL/web-gallery/client/js/libs.js" type="text/javascript"></script>
<script src="LINK_HOTEL/web-gallery/client/js/common.js" type="text/javascript"></script>
<!-- Style Sheets -->
<link rel="stylesheet" href="LINK_HOTEL/web-gallery/client/css/common.css" type="text/css" />
<link rel="stylesheet" href="LINK_HOTEL/web-gallery/client/css/style.css" type="text/css" />
<link rel="stylesheet" href="LINK_HOTEL/web-gallery/client/css/habboflashclient.css" type="text/css" />
<script src="LINK_HOTEL/web-gallery/client/js/habboflashclient.js" type="text/javascript"></script>
<script type="text/javascript">
var HabboSwf = "http://LINK_HOTEL/LINK_DA_SWF/gordon/SUA_RELEASE/Habbo.swf";
var SwfUrl = "http://LINK_HOTEL/LINK_DA_SWF/gordon/SUA_RELEASE/";
var BaseUrl = "http://LINK_HOTEL/LINK_DA_SWF/";
var HotelUrl = "http://LINK_HOTEL/";
var flashvars =
{
"client.starting": "Aguarde, Hotel Carregando",
"client.allow.cross.domain": "1",
"client.notify.cross.domain": "0",
"connection.info.host": "SEU_IP",
"connection.info.port": "PORTA",
"site.url": HotelUrl,
"url.prefix": HotelUrl + "client",
"client.reload.url": HotelUrl + "client",
"client.fatal.error.url": HotelUrl + "client",
"client.connection.failed.url": HotelUrl + "client",
"external.variables.txt": BaseUrl + "gamedata/external_variables.txt",
"external.texts.txt": BaseUrl + "gamedata/external_flash_texts.txt",
"productdata.load.url": BaseUrl + "gamedata/productdata.txt",
"furnidata.load.url": BaseUrl + "game/gamedata/furnidata.xml",
"use.sso.ticket": "1",
"sso.ticket": "<?php echo $ticket; ?>",
"processlog.enabled": "1",
"flash.client.url": SwfUrl,
"flash.client.origin": "popup"
};
var params =
{
"base": SwfUrl,
"allowScriptAccess": "always",
"menu": "false"
};
swfobject.embedSWF (HabboSwf, "client", "100%", "100%", "10.0.0", SwfUrl + "expressInstall.swf", flashvars, params, null);
</script>
</head>
<body id="client" class="flashclient">
<div id="overlay"></div>
<div id="client-ui">
<div id="flash-wrapper" style="height:100% !important;min-height:100% !important;">
<div id="flash-container">
<script type="text/javascript">
$ ('content').show ();
</script>
</div>
</div>
</body>
</html>
Créditos
bi0s
Bug
Remova o
- Código:
[b][/b]