Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
$_F=__FILE__;$_X='P3RdPzx2PFNLKlM4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4..
Decoded Output download
?><?php
/*
=====================================================
DataLife Engine - by SoftNews Media Group
-----------------------------------------------------
https://dle-news.ru/
-----------------------------------------------------
Copyright (c) 2004-2023 SoftNews Media Group
=====================================================
This code is protected by copyright
=====================================================
File: vote.php
-----------------------------------------------------
Use: AJAX votes
=====================================================
*/
if(!defined('DATALIFEENGINE')) {
header( "HTTP/1.1 403 Forbidden" );
header ( 'Location: ../../' );
die( "Hacking attempt!" );
}
$rid = intval( $_REQUEST['vote_id'] );
$vote_check = intval( $_REQUEST['vote_check'] );
$nick = $db->safesql($member_id['name']);
$tpl = new dle_template();
$tpl->dir = ROOT_DIR . '/templates/' . $config['skin'];
define( 'TEMPLATE_DIR', $tpl->dir );
if( $_REQUEST['vote_action'] == "vote" ) {
if( !isset($_REQUEST['user_hash']) OR !$_REQUEST['user_hash'] OR $_REQUEST['user_hash'] != $dle_login_hash ) {
echo $lang['sess_error']; die();
}
if ($user_group[$member_id['user_group']]['allow_vote']) {
if( $is_logged ) $row = $db->super_query( "SELECT count(*) as count FROM " . PREFIX . "_vote_result WHERE vote_id='$rid' AND name='$nick'" );
else $row = $db->super_query( "SELECT count(*) as count FROM " . PREFIX . "_vote_result WHERE vote_id='$rid' AND ip='$_IP'" );
if( !$row['count'] ) $is_voted = false;
else $is_voted = true;
} else $is_voted = true;
if( $is_voted == false ) {
if( ! $is_logged ) $nick = "guest";
$db->query( "INSERT INTO " . PREFIX . "_vote_result (ip, name, vote_id, answer) VALUES ('$_IP', '$nick', '$rid', '$vote_check')" );
$db->query( "UPDATE " . PREFIX . "_vote SET vote_num=vote_num+1 WHERE id='$rid'" );
}
}
if( $_REQUEST['vote_mode'] == "fast_vote" ) { echo $lang['vote_ok']; die(); }
$result = $db->super_query( "SELECT * FROM " . PREFIX . "_vote WHERE id='$rid'" );
$title = stripslashes( $result['title'] );
$body = stripslashes( $result['body'] );
$body = str_replace( "<br />", "<br>", $body );
$body = explode( "<br>", $body );
$max = $result['vote_num'];
$db->query( "SELECT answer, count(*) as count FROM " . PREFIX . "_vote_result WHERE vote_id='$rid' GROUP BY answer" );
$answer = array ();
while ( $row = $db->get_row() ) {
$answer[$row['answer']]['count'] = $row['count'];
}
$db->free();
$pn = 0;
$entry = "";
for($i = 0; $i < sizeof( $body ); $i ++) {
$num = $answer[$i]['count'];
++ $pn;
if( $pn > 5 ) $pn = 1;
if( ! $num ) $num = 0;
if( $max != 0 ) $proc = (100 * $num) / $max;
else $proc = 0;
$proc = round( $proc, 2 );
$entry .= "<div class=\"vote\">$body[$i] - $num ($proc%)</div><div class=\"voteprogress\"><span class=\"vote{$pn}\" style=\"width:".intval($proc)."%;\">{$proc}%</span></div>
";
}
$entry = "<div id=\"dle-vote\">$entry</div>";
$tpl->load_template( 'vote.tpl' );
$tpl->set( '{list}', $entry );
$tpl->set( '{vote_id}', $rid );
$tpl->set( '{title}', $title );
$tpl->set( '{votes}', $max );
$tpl->set( '[voteresult]', '' );
$tpl->set( '[/voteresult]', '' );
$tpl->set_block( "'\[votelist\].*?\[/votelist\]'si", "" );
$tpl->compile( 'vote' );
$db->close();
$tpl->result['vote'] = str_replace( '{THEME}', $config['http_home_url'] . 'templates/' . $config['skin'], $tpl->result['vote'] );
echo $tpl->result['vote'];
?>
Did this file decode correctly?
Original Code
$_F=__FILE__;$_X='P3RdPzx2PFNLKlM4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OFMyTkZpRlRQN1cyVUNzUENXMi0yMFkyWlI3aXpXfUwyYVcKUEYyPiBSRzwyUy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tUzJ2a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InT1JpVycyKTtTUwkkCjAtdFtuUkxXKCk7U1MJJGk8bi10IFdMR25pcSdPUmlXJ2UyODJMaSBfIFc8bkZbVygyJ0IxM1VhVXgnLDIkW1JDN1BzcSd2aWk8X3ZSbFdfRyBuJ2UyZDInaVdsPG5GaVdMSycyZDIkW1JDN1BzcSdMVlBDJ2UsMiRpPG4tdCBXTEduaXEnT1JpVydlMik7U1MJV1t2UjIkaTxuLXQgV0xHbmlxJ09SaVcnZTtTCVM/dA==';$_D=strrev('edoced_46esab');eval($_D('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF9YLCdQRm9aM1ZOY1Jke01JYlU5Nz13aH08US94ZUdUQkV6OHJhbFc1alhnREFzTGtISgpxQ115MG0+MTZ0di5PaVk0Mm5LIHVbU3BmJywnaWExU0hrRDlvLkpPUFdFMmY3MFh3cEJJfV11THtZTj00TW1lUjVDS1ZaZ3NqOHFkW248VWI2R1R4PmhRdnR5eiBsL3IzYwpBRicpOyRfUj1zdHJfcmVwbGFjZSgnX19GSUxFX18nLCInIi4kX0YuIiciLCRfWCk7ZXZhbCgkX1IpOyRfUj0wOyRfWD0wOw=='));
Function Calls
strtr | 1 |
strrev | 1 |
str_replace | 1 |
base64_decode | 2 |
Stats
MD5 | 9a0d6cd48a6fafbb08ee627d439a0308 |
Eval Count | 2 |
Decode Time | 41 ms |