PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>TAD File Reader</title>
<style type="text/css">
.content {
float: left;
font-size: 11px;
margin: 5px;
padding: 5px;
}
.utility {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background: red;
border-radius: 5px;
clear: left;
cursor:pointer;
float: left;
font-size: 11px;
height: auto;
margin: 5px;
padding: 5px;
width: 180px;
}
.box {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background: #6699FF;
border-radius: 5px;
cursor:pointer;
float: left;
font-size: 17px;
height: auto;
margin: 10px;
padding: 10px;
width: auto;
}
</style>
</head>
<body>
<div class="content">
<div class="box">
<form id="finduser" method="POST" action="tad.php">
<input type="text" id="search" name="search">
<input type="Submit" Value="Search for User">
<input type="hidden" name="action" value="submitted">
</form>
<?php
if ($_POST['action'] == 'submitted')
{
error_reporting(0);
function raza($raza){
$razastr1 = '';
switch($raza){
case 1:
$razastr1 = 'Naga';
break;
case 2:
$razastr1 = 'Kinnara';
break;
case 4:
$razastr1 = 'Asura';
break;
case 8:
$razastr1 = 'Rakshasa';
break;
case 16:
$razastr1 = 'Yaksa';
break;
case 32:
$razastr1 = 'Gandarva';
break;
case 64:
$razastr1 = 'Deva';
break;
case 128:
$razastr1 = 'Garuda';
break;
default:
$razastr1 = 'GM';
}
return $razastr1;
}
function dios($dios){
$diosstr= '';
switch($dios){
case 1:
$diosstr='Brahma';
break;
case 2:
$diosstr='Vishnu';
break;
case 4:
$diosstr='Shiva';
break;
case 10:
$diosstr='GM';
break;
default:
$diosstr='None';
}
return $diosstr;
}
$accdir = 'ACCOUNT DIRECTORY';
$post = $_POST['search'];
$Initial=substr($post,0,1);
$nombre_fichero = $_POST['search'].".tad";
$gestor = fopen("$accdir\\$Initial\\$nombre_fichero", "rb")or die("Unable to find account to $post");
$contenido = fread($gestor, filesize($nombre_fichero));
$contrasenia = substr($contenido,52,32);
$charsep = 1688;
$char1 = substr($contenido,88+$charsep*0,20);
$char2 = substr($contenido,88+$charsep*1,20);
$char3 = substr($contenido,88+$charsep*2,20);
$raza1 = base_convert(bin2hex(substr($contenido,116+$charsep*0,1)),16,10);
$raza2 = base_convert(bin2hex(substr($contenido,116+$charsep*1,1)),16,10);
$raza3 = base_convert(bin2hex(substr($contenido,116+$charsep*2,1)),16,10);
$pd1 = base_convert(bin2hex(strrev(substr($contenido,136+$charsep*0,4))),16,10);
$pd2 = base_convert(bin2hex(strrev(substr($contenido,136+$charsep*1,4))),16,10);
$pd3 = base_convert(bin2hex(strrev(substr($contenido,136+$charsep*2,4))),16,10);
$mp1 = base_convert(bin2hex(strrev(substr($contenido,2816+$charsep*0,4))),16,10);
$mp2 = base_convert(bin2hex(strrev(substr($contenido,6192+$charsep*0,4))),16,10);
$mp3 = base_convert(bin2hex(strrev(substr($contenido,9568+$charsep*0,4))),16,10);
$dios1 = base_convert(bin2hex(substr($contenido,144+$charsep*0,1)),16,10);
$dios2 = base_convert(bin2hex(substr($contenido,144+$charsep*1,1)),16,10);
$dios3 = base_convert(bin2hex(substr($contenido,144+$charsep*2,1)),16,10);
$lvl1 = base_convert(bin2hex(substr($contenido,145+$charsep*0,1)),16,10);
$lvl2 = base_convert(bin2hex(substr($contenido,145+$charsep*1,1)),16,10);
$lvl3 = base_convert(bin2hex(substr($contenido,145+$charsep*2,1)),16,10);
$muscle1 = base_convert(bin2hex(strrev(substr($contenido,108+$charsep*0,2))),16,10);
$muscle2 = base_convert(bin2hex(strrev(substr($contenido,108+$charsep*1,2))),16,10);
$muscle3 = base_convert(bin2hex(strrev(substr($contenido,108+$charsep*2,2))),16,10);
$nerve1 = base_convert(bin2hex(strrev(substr($contenido,110+$charsep*0,2))),16,10);
$nerve2 = base_convert(bin2hex(strrev(substr($contenido,110+$charsep*1,2))),16,10);
$nerve3 = base_convert(bin2hex(strrev(substr($contenido,110+$charsep*2,2))),16,10);
$heart1 = base_convert(bin2hex(strrev(substr($contenido,112+$charsep*0,2))),16,10);
$heart2 = base_convert(bin2hex(strrev(substr($contenido,112+$charsep*1,2))),16,10);
$heart3 = base_convert(bin2hex(strrev(substr($contenido,112+$charsep*2,2))),16,10);
$soul1 = base_convert(bin2hex(strrev(substr($contenido,114+$charsep*0,2))),16,10);
$soul2 = base_convert(bin2hex(strrev(substr($contenido,114+$charsep*1,2))),16,10);
$soul3 = base_convert(bin2hex(strrev(substr($contenido,114+$charsep*2,2))),16,10);
echo '<br>M5 Password: ' . $contrasenia . '<br><br>';
//Character 1
echo 'Char 1: ' . $char1 . '<br>';
echo 'God: ' . dios($dios1) . '<br>';
echo 'Level: ' . $lvl1 . '<br>';
echo 'Muscle: ' . $muscle1 . '<br>';
echo 'Nerve: ' . $nerve1 . '<br>';
echo 'Heart: ' . $heart1 . '<br>';
echo 'Soul: ' . $soul1 . '<br>';
echo 'Tribe: ' . raza($raza1) . '<br>';
echo 'Monthly MP: ' . $mp1 . '<br>';
echo 'Master Points: ' . $pd1 . '<br><br>';
//Character 2
echo 'Char 2: ' . $char2 . '<br>';
echo ' God: ' . dios($dios2) . '<br>';
echo 'Level: ' . $lvl2 . '<br>';
echo 'Muscle: ' . $muscle2 . '<br>';
echo 'Nerve: ' . $nerve2 . '<br>';
echo 'Heart: ' . $heart2 . '<br>';
echo 'Soul: ' . $soul2 . '<br>';
echo 'Tribe: ' . raza($raza2) . '<br>';
echo 'Monthly MP: ' . $mp2 . '<br>';
echo 'Master Points: ' . $pd2 . '<br><br>';
//Character 3
echo 'Char 3: ' . $char3 . '<br>';
echo 'God: ' . dios($dios3) . '<br>';
echo 'Level: ' . $lvl3 . '<br>';
echo 'Muscle: ' . $muscle3 . '<br>';
echo 'Nerve: ' . $nerve3 . '<br>';
echo 'Heart: ' . $heart3 . '<br>';
echo 'Soul: ' . $soul3 . '<br>';
echo 'Tribe: ' . raza($raza3) . '<br>';
echo 'Monthly MP: ' . $mp3 . '<br>';
echo 'Master Points: ' . $pd3 . '<br><br>';
echo '</div></div>';
fclose($gestor);
}
?>
</body>
</html>