|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
[ioncube] decode help (lost the original code) |
|
Posted: Wed Nov 28, 2012 5:08 pm |
|
|
capricorn |
Beginner |
|
|
Joined: Nov 28, 2012 |
Posts: 2 |
|
|
|
|
|
|
|
|
|
|
|
|
uncode code :) |
|
Posted: Wed Nov 28, 2012 5:24 pm |
|
|
aponte |
Active user |
|
|
Joined: Aug 03, 2012 |
Posts: 33 |
|
|
|
|
|
|
|
Here you are!!
<?php
function trataplica( $x )
{
return str_replace( "'", "\\'", $x );
}
function validalogin( $user, $pass )
{
$query = "SELECT username FROM users WHERE username LIKE '{$user}' AND passw='".md5( $pass )."'";
$result = mysql_query( $query );
if ( $row = mysql_fetch_row( $result ) )
{
$_SESSION['ruser'] = $row[0];
}
else
{
$_SESSION['ruser'] = null;
}
}
function selordem( $idsel = 0, $classe = 0 )
{
global $privinsercao;
$conteudo = "<select onkeypress='if (event.keyCode == 13) this.form.submit();' name='ordem' id='ordem' onChange=\"if(this.value=='outro') {newwindow=window.open('remote.php?act=newordem','Ordem','screenX=0,screenY=0,toolbar=no,directories=no,status=no,resizable=yes,menubar=no,scrollbars=no,width=205,height=240'); newwindow.focus();} get('act=ordem&idsel='+this.value); return false;\"><option value=''></option>";
$query = "SELECT id, nome FROM ordem WHERE classe='{$classe}' ORDER BY nome";
$result = mysql_query( $query );
while ( $row = mysql_fetch_row( $result ) )
{
$conteudo .= "<option value='{$row['0']}'".( $idsel == $row[0] ? " selected" : "" ).">{$row['1']}</option>";
}
if ( $classe )
{
$conteudo .= "\r\n".( $privinsercao ? "<option value='outro'>Outro (acrescentar)</option>" : "" )."\r\n</select>";
}
else
{
$conteudo .= "</select>";
}
return $conteudo;
}
function selclasse( $idsel = 0 )
{
global $privinsercao;
$conteudo = "<select onkeypress='if (event.keyCode == 13) this.form.submit();' name='classe' id='classe' onChange=\"limpaoptions('especie'); if(this.value=='outro') {newwindow=window.open('remote.php?act=newclasse','Classes','screenX=0,screenY=0,toolbar=no,directories=no,status=no,resizable=yes,menubar=no,scrollbars=no,width=205,height=240'); newwindow.focus();} else get('act=classe&idsel='+this.value); return false;\"><option value=''></option>";
$query = "SELECT id, nome FROM classes WHERE estado<>'R' ORDER BY nome";
$result = mysql_query( $query );
while ( $row = mysql_fetch_row( $result ) )
{
$conteudo .= "<option value='{$row['0']}'".( $idsel == $row[0] ? " selected" : "" ).">{$row['1']}</option>";
}
$conteudo .= "\r\n".( $privinsercao ? "<option value='outro'>Outro (acrescentar)</option>" : "" )."\r\n</select>";
return $conteudo;
}
function selespecie( $idsel = 0, $ordem = 0 )
{
global $privinsercao;
$conteudo = "<select onkeypress='if (event.keyCode == 13) this.form.submit();' name='especie' id='especie' onChange=\"if(this.value=='outro') {newwindow=window.open('remote.php?act=newespecie&ordem={$ordem}','Espécies','screenX=0,screenY=0,toolbar=no,directories=no,status=no,resizable=yes,menubar=no,scrollbars=no,width=205,height=240'); newwindow.focus();} return false;\"><option value=''></option>";
$query = "SELECT id, nome FROM especies WHERE estado<>'R' AND ordem='{$ordem}' ORDER BY nome";
$result = mysql_query( $query );
while ( $row = mysql_fetch_row( $result ) )
{
$conteudo .= "<option value='{$row['0']}'".( $idsel == $row[0] ? " selected" : "" ).">{$row['1']}</option>";
}
if ( $ordem )
{
$conteudo .= "\r\n".( $privinsercao ? "<option value='outro'>Outro (acrescentar)</option>" : "" )."\r\n</select>";
}
else
{
$conteudo .= "</select>";
}
return $conteudo;
}
function selsexo( $idsel = 0 )
{
$conteudo = "<select onkeypress='if (event.keyCode == 13) this.form.submit();' name='sexo' id='sexo'><option value=''></option><option value='macho'".( $idsel == "macho" ? " selected" : "" ).">Masculino</option><option value='femea'".( $idsel == "femea" ? " selected" : "" ).">Feminino</option><option value='indefinido'".( $idsel == "indefinido" ? " selected" : "" ).">Indefinido</option></select>";
return $conteudo;
}
function getespecie( $idsel )
{
$query = "SELECT nome FROM especies WHERE id='{$idsel}'";
$result = mysql_query( $query );
if ( $row = mysql_fetch_row( $result ) )
{
return $row[0];
}
}
function getclasse( $idsel )
{
$query = "SELECT nome FROM classes WHERE id='{$idsel}'";
$result = mysql_query( $query );
if ( $row = mysql_fetch_row( $result ) )
{
return $row[0];
}
}
function getordem( $idsel )
{
$query = "SELECT nome FROM ordem WHERE id='{$idsel}'";
$result = mysql_query( $query );
if ( $row = mysql_fetch_row( $result ) )
{
return $row[0];
}
}
function getsexo( $idsel )
{
if ( $idsel == "macho" )
{
return "Masculino";
}
if ( $idsel == "femea" )
{
return "Feminino";
}
if ( $idsel == "indefinido" )
{
return "Indefinido";
}
}
function getdetalhes( $idsel )
{
$query = "SELECT ";
}
function seluser( $idsel = "" )
{
$conteudo = "<select onkeypress='if (event.keyCode == 13) this.form.submit();' name='user' id='user'><option value=''></option>";
$query = "SELECT id, nome FROM users WHERE estado<>'R' ORDER BY nome";
$result = mysql_query( $query );
while ( $row = mysql_fetch_row( $result ) )
{
$conteudo .= "<option value='{$row['0']}'".( $idsel == $row[0] ? " selected" : "" ).">{$row['1']}</option>";
}
$conteudo .= "\r\n</select>";
return $conteudo;
}
function getuserid( $idsel )
{
$query = "SELECT id FROM users WHERE username='{$idsel}'";
$result = mysql_query( $query );
if ( $row = mysql_fetch_row( $result ) )
{
return $row[0];
}
}
function formata_preco( $idsel )
{
return number_format( $idsel, 2, ",", "." );
}
function formata_preco3( $idsel )
{
return number_format( $idsel, 3, ",", "." );
}
function trata_data( $idsel )
{
if ( strlen( $idsel ) == 14 )
{
return substr( $idsel, 0, 4 )."-".substr( $idsel, 4, 2 )."-".substr( $idsel, 6, 2 );
}
return $idsel;
}
function trata_data2( $idsel )
{
if ( strlen( $idsel ) == 14 )
{
return substr( $idsel, 0, 4 )."-".substr( $idsel, 4, 2 )."-".substr( $idsel, 6, 2 )." ".substr( $idsel, 8, 2 ).":".substr( $idsel, 10, 2 );
}
return $idsel;
}
function getnome( $idsel )
{
$query = "SELECT nome FROM users WHERE id='{$idsel}'";
$result = mysql_query( $query );
if ( $row = mysql_fetch_row( $result ) )
{
return $row[0];
}
}
function getiva( $idsel = "" )
{
if ( $idsel == "" )
{
$query = "SELECT iva FROM iva WHERE defeito";
$result = mysql_query( $query );
if ( $row = mysql_fetch_row( $result ) )
{
return $row[0];
}
}
return $idsel;
}
function seliva( $idsel = "" )
{
$res = "<select onkeypress='if (event.keyCode == 13) this.form.submit();' name='iva'>";
$query = "SELECT iva FROM iva ORDER BY defeito DESC, iva";
$result = mysql_query( $query );
while ( $row = mysql_fetch_row( $result ) )
{
$res .= "<option value='{$row['0']}'".( $idsel == $row[0] ? " selected" : "" ).">{$row['0']}</option>";
}
$res .= "</select>";
return $res;
}
function getmotivo( $idsel )
{
$query = "SELECT nome FROM motivo WHERE id='{$idsel}'";
$result = mysql_query( $query );
if ( $row = mysql_fetch_row( $result ) )
{
return $row[0];
}
}
function selmotivo( $idsel = 0 )
{
global $privinsercao;
$conteudo = "<select onkeypress='if (event.keyCode == 13) this.form.submit();' name='motivo' id='motivo' onChange=\"if(this.value=='outro') {newwindow=window.open('remote.php?act=newmotivo','Motivo','screenX=0,screenY=0,toolbar=no,directories=no,status=no,resizable=yes,menubar=no,scrollbars=no,width=205,height=240'); newwindow.focus();} else get('act=motivo&idsel='+this.value); return false;\"><option value=''></option>";
$query = "SELECT id, nome FROM motivo ORDER BY nome";
$result = mysql_query( $query );
while ( $row = mysql_fetch_row( $result ) )
{
$conteudo .= "<option value='{$row['0']}'".( $idsel == $row[0] ? " selected" : "" ).">{$row['1']}</option>";
}
$conteudo .= "\r\n".( $privinsercao ? "<option value='outro'>Outro (acrescentar)</option>" : "" )."\r\n</select>";
return $conteudo;
}
function getcodcor( $idsel )
{
if ( $idsel == "sucesso" )
{
$cor = "verde";
}
else if ( $idsel == "insucesso" )
{
$cor = "bordo";
}
else if ( $idsel == "pendente" )
{
$cor = "cinza";
}
else
{
$cor = "branco";
}
return "<img src='images/{$cor}.png' border=0 title='{$idsel}'>";
}
include_once( "defaults.php" );
mysql_connect( $host, $db_user, $pass );
mysql_select_db( $bd );
$tsdia = date( "YmdHis" );
$query = "INSERT INTO operacoes (script, qs, ip, culpado, tsdia) VALUES ('".$_SERVER['REQUEST_URI']."', '";
foreach ( $_POST as $k => $v )
{
$query .= "<POST id={$k}>".trataplica( $v )."</POST>";
}
foreach ( $_GET as $k => $v )
{
$query .= "<GET id={$k}>".trataplica( $v )."</GET>";
}
foreach ( $_FILES as $k => $v )
{
$query .= "<FILES id={$k}>";
if ( is_array( $v ) )
{
foreach ( $v as $k1 => $v1 )
{
$query .= "<id={$k1}>".trataplica( $v1 );
}
}
else
{
$query .= trataplica( $v );
}
$query .= "</FILES>";
}
$query .= "', '".$REMOTE_ADDR."', '".$ruser."', ".$tsdia.")";
mysql_query( $query );
if ( $act == "login" )
{
$query = "SELECT username, id, nome FROM users WHERE username='{$usr}' AND passwd='".md5( $pwr )."'";
$result = mysql_query( $query );
if ( $row = mysql_fetch_row( $result ) )
{
$_SESSION['ruser'] = $row[0];
$_SESSION['nuser'] = $row[2];
}
}
if ( $act == "logout" )
{
$_SESSION = array( );
session_destroy( );
if ( $servidor == "laptop" && $desliga == 1 )
{
$localdir = trim( file_get_contents( "../../usr/local/localdir.txt" ) )."\\server_stop.bat";
shell_exec( "{$localdir}" );
}
}
if ( !$_SESSION['ruser'] )
{
echo "\r\n<head>\r\n<link rel='icon' href='./favicon.ico' type='image/x-icon' />\r\n<link rel='shortcut icon' href='./favicon.ico' type='image/x-icon' />\r\n<link rel='stylesheet' href='main.css' type='text/css'>\r\n</head>\r\n<body style='background-image: url(images/background.jpg); background-repeat: no-repeat; background-position: center center;'>\r\n<table width=100% height=100%>\r\n\t<tr><td align=center>\r\n\t\t<table>\r\n\t\t\t<form name='frmMain' method='POST' action='index.php'>\r\n\t\t\t<input type='hidden' name='act' value='login'>\r\n\t\t\t<tr><td colspan=2 align=center class='formwhite'><b>Autenticação</b></td></tr>\r\n\t\t\t<tr><td class='formwhite'>Username:</td><td><input type='text' name='usr'></td></tr>\r\n\t\t\t<tr><td class='formwhite'>Password:</td><td><input type='password' name='pwr'></td></tr>\r\n\t\t\t<tr><td colspan=2 align=center><input type='submit' value='Validar'></td></tr>\r\n\t\t</table>\r\n\t</td></tr>\r\n\t<tr><td height=100 colspan=2> ;;</td>\r\n</table>";
exit( );
}
$culpado = $_SESSION['ruser'];
$result = mysql_query( "SELECT priv FROM privs WHERE user='{$culpado}'" );
while ( $row = mysql_fetch_row( $result ) )
{
${ "priv".$row[0] } = "on";
$_SESSION["priv".$row[0]] = "on";
}
?> |
|
|
|
|
|
|
thanks |
|
Posted: Wed Nov 28, 2012 5:35 pm |
|
|
capricorn |
Beginner |
|
|
Joined: Nov 28, 2012 |
Posts: 2 |
|
|
|
|
|
|
|
Thank you very much, the file seems to be ok.
How can i get started with decoding files myself? |
|
|
|
|
Posted: Wed Nov 28, 2012 6:48 pm |
|
|
aponte |
Active user |
|
|
Joined: Aug 03, 2012 |
Posts: 33 |
|
|
|
|
|
|
|
|
|
|
|
www.waraxe.us Forum Index -> PHP script decode requests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT
Page 1 of 1
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|