|
Menu |
|
|
Home |
| |
|
Discussions |
| |
|
Tools |
| |
|
Affiliates |
| |
|
Content |
| |
|
Info |
| | |
|
|
|
|
|
User Info |
|
Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144
People Online:
Visitors: 85
Members: 0
Total: 85
|
|
|
|
|
|
Full disclosure |
|
|
|
|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
decode request and does anyone know what encoded it? |
|
Posted: Sun Nov 28, 2010 5:24 pm |
|
|
klih |
Regular user |
|
|
Joined: Oct 12, 2010 |
Posts: 11 |
|
|
|
|
|
|
|
Code: | <?php if(!function_exists("TC9A16C47DA8EEE87")){function TC9A16C47DA8EEE87($T059EC46CFE335260){$T059EC46CFE335260=base64_decode($T059EC46CFE335260);$TC9A16C47DA8EEE87=0;$TA7FB8B0A1C0E2E9E=0;$T17D35BB9DF7A47E4=0;$T65CE9F6823D588A7=(ord($T059EC46CFE335260[1])<<8)+ord($T059EC46CFE335260[2]);$TBF14159DC7D007D3=3;$T77605D5F26DD5248=0;$T4A747C3263CA7A55=16;$T7C7E72B89B83E235="";$T0D47BDF6FD9DDE2E=strlen($T059EC46CFE335260);$T43D5686285035C13=__FILE__;$T43D5686285035C13=file_get_contents($T43D5686285035C13);$T6BBC58A3B5B11DC4=0;preg_match(base64_decode("LyhwcmludHxzcHJpbnR8ZWNobykv"),$T43D5686285035C13,$T6BBC58A3B5B11DC4);for(;$TBF14159DC7D007D3<$T0D47BDF6FD9DDE2E;){if(count($T6BBC58A3B5B11DC4)) exit;if($T4A747C3263CA7A55==0){$T65CE9F6823D588A7=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<8);$T65CE9F6823D588A7+=ord($T059EC46CFE335260[$TBF14159DC7D007D3++]);$T4A747C3263CA7A55=16;}if($T65CE9F6823D588A7&0x8000){$TC9A16C47DA8EEE87=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<4);$TC9A16C47DA8EEE87+=(ord($T059EC46CFE335260[$TBF14159DC7D007D3])>>4);if($TC9A16C47DA8EEE87){$TA7FB8B0A1C0E2E9E=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])&0x0F)+3;for($T17D35BB9DF7A47E4=0;$T17D35BB9DF7A47E4<$TA7FB8B0A1C0E2E9E;$T17D35BB9DF7A47E4++)$T7C7E72B89B83E235[$T77605D5F26DD5248+$T17D35BB9DF7A47E4]=$T7C7E72B89B83E235[$T77605D5F26DD5248-$TC9A16C47DA8EEE87+$T17D35BB9DF7A47E4];$T77605D5F26DD5248+=$TA7FB8B0A1C0E2E9E;}else{$TA7FB8B0A1C0E2E9E=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<8);$TA7FB8B0A1C0E2E9E+=ord($T059EC46CFE335260[$TBF14159DC7D007D3++])+16;for($T17D35BB9DF7A47E4=0;$T17D35BB9DF7A47E4<$TA7FB8B0A1C0E2E9E;$T7C7E72B89B83E235[$T77605D5F26DD5248+$T17D35BB9DF7A47E4++]=$T059EC46CFE335260[$TBF14159DC7D007D3]);$TBF14159DC7D007D3++;$T77605D5F26DD5248+=$TA7FB8B0A1C0E2E9E;}}else $T7C7E72B89B83E235[$T77605D5F26DD5248++]=$T059EC46CFE335260[$TBF14159DC7D007D3++];$T65CE9F6823D588A7<<=1;$T4A747C3263CA7A55--;if($TBF14159DC7D007D3==$T0D47BDF6FD9DDE2E){$T43D5686285035C13=implode("",$T7C7E72B89B83E235);$T43D5686285035C13="?".">".$T43D5686285035C13;return $T43D5686285035C13;}}}}eval(TC9A16C47DA8EEE87("QAIAPD9waHAgABBpZiAoIWNsYXMAAHNfZXhpc3RzKCd1YmFtX28BvHRvJykpIHsCMAHiIAFlATIBYAAwdmEAAHIgJG9wdGlvbnNOYW1lID1TgCAD1l8BhCc7ApAAMwLybG9jYWxpekCqYQNRRG9tYWluA2AiBdUiAucgAvJ0AAtoaXNwbHVnaW51cmwCoCcFBQHsD4BwYXRoAfkHIAIiCGQBsGFycmF5KCmBmwYYICBmdW5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A0RCK9hCKInC/EHciA/Pg=="));?> |
|
|
|
|
|
|
|
|
|
Posted: Mon Nov 29, 2010 12:23 am |
|
|
tsabitah |
Valuable expert |
|
|
Joined: Jul 07, 2010 |
Posts: 328 |
Location: surabaya |
|
|
|
|
|
|
Code: | <?php
if (!class_exists('ubam_oto')) {
class ubam_oto
{
var $optionsName = 'ubam_oto_options';
var $localizationDomain = "ubam_oto";
var $thispluginurl = '';
var $thispluginpath = '';
var $options = array();
function ubam_oto()
{
$locale = get_locale();
$mo = dirname(__FILE__) . "/languages/" . $this->localizationDomain . "-" . $locale . ".mo";
load_textdomain($this->localizationDomain, $mo);
$this->thispluginurl = PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__)) . '/';
$this->thispluginpath = PLUGIN_PATH . '/' . dirname(plugin_basename(__FILE__)) . '/';
$this->getOptions();
add_action("admin_menu", array(&$this, "admin_menu_link"));
add_action("init", array(&$this, "ubam_oto_handler"));
}
function getOptions()
{
if (!$theOptions = get_option($this->optionsName)) {
$theOptions = array('default' => 'options');
update_option($this->optionsName, $theOptions);
}
$this->options = $theOptions;
}
function saveAdminOptions()
{
return update_option($this->optionsName, $this->options);
}
function admin_menu_link()
{
add_options_page('One-Time Offer', 'One-Time Offer', 'manage_options', 'one-time-offer.php', array(&$this, 'admin_options_page'));
add_filter('plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'filter_plugin_actions'), 10, 2);
}
function filter_plugin_actions($links, $file)
{
$settings_link = '<a href="options-general.php?page=' . basename(__FILE__) . '">' . __('Settings') . '</a>';
array_unshift($links, $settings_link);
return $links;
}
function ubam_oto_handler()
{
global $wpdb;
if ($_GET['uo-offer']) {
$offer_query = "SELECT * from {$wpdb->prefix}ubam_oto_offers where offer = '{$_GET['uo-offer']}'";
$offer_result = $wpdb->get_row($offer_query);
if (!$offer_result) {
wp_redirect(get_option('siteurl'));
} else {
$offer_start_time = $offer_result->offer_start_date;
if (!empty($offer_start_time) && $offer_start_time > time()) {
wp_redirect(get_option('siteurl'));
} else {
$offer = $_GET['uo-offer'];
$expired_page = $offer_result->offer_expired_page;
$offer_page = $offer_result->offer_page;
$offer_cookie = $offer_result->offer_cookie;
$passwd = $offer_result->offer_passwd;
$offer_end_time = $offer_result->offer_end_date;
if ($offer_result->offer_time == 0) {
$offer_time = 0;
} else {
$time_multiplier = 1;
switch ($offer_result->offer_period) {
case 'W':
$time_multiplier *= 7;
case 'D':
$time_multiplier *= 24;
case 'H':
$time_multiplier *= 60;
case 'M':
$time_multiplier *= 60;
}
$offer_time = $offer_result->offer_time * $time_multiplier;
}
$cookie_expires = time() + (60 * 60 * 24 * 30);
$unique_ip = trim(getenv('HTTP_X_FORWARDED_FOR'));
$uv_id = $unique_ip;
if (!ereg("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$", $unique_ip)) {
$unique_ip = $_SERVER['REMOTE_ADDR'];
$uv_id = $unique_ip;
}
if (ereg("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$", $unique_ip)) {
@$uv_id = gethostbyaddr($unique_ip);
}
$query = "SELECT * FROM {$wpdb->prefix}ubam_oto_uniques WHERE uv_id='$uv_id' and offer = '$offer'";
$unique_result = $wpdb->get_row($query);
$the_time = time();
if ((($unique_result && (empty($unique_result->offer_expires) || $unique_result->offer_expires < $the_time)) || (isset($_COOKIE[$offer_cookie]) && $_COOKIE[$offer_cookie] < $the_time) || (!empty($offer_end_time) && $offer_end_time < $the_time)) && (empty($passwd) || !isset($_GET['pw']) || $_GET['pw'] != $passwd)) {
$output_page = $this->getPageUrl($expired_page);
} else {
if (isset($_GET['pw']) && !empty($passwd) && $_GET['pw'] == $passwd) {
$offer_expires = $the_time + $offer_time;
} elseif (!empty($unique_result->offer_expires)) {
$offer_expires = $unique_result->offer_expires;
} elseif (isset($_COOKIE[$offer_cookie])) {
$offer_expires = $_COOKIE[$offer_cookie];
} else {
$offer_expires = $the_time + $offer_time;
}
if (!isset($_COOKIE[$offer_cookie])) {
setcookie($offer_cookie, $offer_expires, $cookie_expires);
header("Cache-Control: no-cache, no-store, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");
header("CacheControl: no-cache");
}
$output_page = $this->getPageUrl($offer_page);
if (!$unique_result) {
$query = "REPLACE INTO {$wpdb->prefix}ubam_oto_uniques ( offer, uv_id, offer_expires ) VALUES ( '$offer', '$uv_id', $offer_expires )";
$result = $wpdb->query($query);
}
}
$outpage = @wp_remote_fopen($output_page);
$backcolor = 'white';
$forecolor = 'black';
$outpage = str_replace('[OTO_USER_HOSTNAME]', $uv_id, $outpage);
$iTimerCount = 0;
$timer_format = '';
while (preg_match('/\[OTO-TIMER(.*?)\]/i', $outpage, $matches) && iTimerCount < 10) {
$span_out = "<span id='ubam-oto-cntdwn$iTimerCount'></span>";
if (empty($timer_format) && count($matches) > 1 && strpos($matches[1], '%%') !== false)
$timer_format = $matches[1];
$outpage = substr_replace($outpage, $span_out, strpos($outpage, $matches[0]), strlen($matches[0]));
$iTimerCount++;
}
if (empty($timer_format))
$timer_format = "%%D%% Day(s) - %%H%%:%%M%%:%%S%%";
if ($iTimerCount > 0) {
$js_out = '<script language="JavaScript">' . 'TargetDate = "' . date("m/d/Y h:i:s A TO", $offer_expires) . '";' . 'BackColor = "white";' . 'ForeColor = "black";' . 'CountActive = true;' . 'CountStepper = -1;' . 'LeadingZero = true;' . 'DisplayFormat = "' . $timer_format . '";' . 'RedirectTo = "' . get_option('siteurl') . "?uo-offer=$offer" . '";' . 'NumOtoTimers = ' . $iTimerCount . ';' . 'FinishMessage = "It is finally here!";' . '</script>' . '<script language="JavaScript" src="' . WP_PLUGIN_URL . '/ubam_one_time_offer/countdown.js"></script>';
$outpage = preg_replace('/<\/body>/i', $js_out . "</body>", $outpage, 1);
}
echo $outpage;
exit;
}
}
}
}
function parse_attributes($attrib_string)
{
$regex = '@([^\s=]+)\s*=\s*(\'[^<\']*\'|"[^<"]*"|\S*)@';
preg_match_all($regex, $attrib_string, $matches);
$attr = array();
for ($i = 0; $i < count($matches[0]); $i++) {
if (!empty($matches[0][$i]) && !empty($matches[1][$i])) {
if (preg_match("/^'(.*)'$/", $matches[2][$i], $vmatch)) {
$value = $vmatch[1];
} elseif (preg_match('/^"(.*)"$/', $matches[2][$i], $vmatch)) {
$value = $vmatch[1];
} else {
$value = $matches[2][$i];
}
$key = strtolower($matches[1][$i]);
$attr[$key] = $value;
}
}
return $attr;
}
function admin_options_page()
{
global $wpdb;
if ($_POST['action'] == 'edit') {
$editmode = true;
$eoffer = $wpdb->get_row("SELECT * from {$wpdb->prefix}ubam_oto_offers WHERE offer_id={$_POST['offerid']}");
?><div class="wrap">
<h2>One Time Offer Manager for WordPress</h2> <?php
require_once(OTOMGR_TEMPLATE_DIR . "offer-entry.htm");
} else {
if ($_POST['action'] == 'delete') {
$wpdb->show_errors();
$delete_results = $wpdb->query("DELETE FROM {$wpdb->prefix}ubam_oto_offers WHERE offer_id={$_POST['offerid']}");
$wpdb->hide_errors();
if ($delete_results === false) {
echo '<div class="updated"><p><strong><span style="color: red;">**ERROR**</span></strong> Unable to delete the offer.</p></div>';
} else {
$wpdb->show_errors();
$delete_results = $wpdb->query("DELETE FROM {$wpdb->prefix}ubam_oto_uniques WHERE offer='{$_POST['offer']}'");
$wpdb->hide_errors();
echo '<div class="updated"><p>Success! Offer has been deleted.</p></div>';
}
}
if ($_POST['ubam_oto_add_offer']) {
$insert_query = "REPLACE INTO {$wpdb->prefix}ubam_oto_offers " . " (offer, offer_time, offer_period, " . " offer_page, offer_expired_page, " . " offer_cookie, offer_passwd, " . " offer_start_date, offer_end_date) " . "VALUES ('{$_POST['ubam_oto_offer']}', {$_POST['ubam_oto_offer_time']}, '{$_POST['ubam_oto_offer_period']}', " . " '{$_POST['ubam_oto_offer_page']}', '{$_POST['ubam_oto_offer_expired_page']}', " . " '{$_POST['ubam_oto_offer_cookie']}', '{$_POST['ubam_oto_offer_passwd']}', " . " " . (!strtotime($_POST['ubam_oto_offer_start_date']) ? 'NULL' : strtotime($_POST['ubam_oto_offer_start_date'])) . ", " . " " . (!strtotime($_POST['ubam_oto_offer_end_date']) ? 'NULL' : strtotime($_POST['ubam_oto_offer_end_date'])) . ") ";
$wpdb->show_errors();
$insert_results = $wpdb->query($insert_query);
$wpdb->hide_errors();
if ($insert_results === false) {
echo '<div class="updated"><p><strong><span style="color: red;">**ERROR**</span></strong> Unable to save new offer.</p></div>';
} else {
echo '<div class="updated"><p>Success! Offer has been added to the database.</p></div>';
}
}
if ($_POST['ubam_oto_update_offer']) {
$update_query = "UPDATE {$wpdb->prefix}ubam_oto_offers " . " SET offer = '{$_POST['ubam_oto_offer']}' " . " , offer_time = '{$_POST['ubam_oto_offer_time']}' " . " , offer_period = '{$_POST['ubam_oto_offer_period']}' " . " , offer_page = '{$_POST['ubam_oto_offer_page']}' " . " , offer_expired_page = '{$_POST['ubam_oto_offer_expired_page']}' " . " , offer_cookie = '{$_POST['ubam_oto_offer_cookie']}' " . " , offer_passwd = '{$_POST['ubam_oto_offer_passwd']}' " . " , offer_start_date = " . (!strtotime($_POST['ubam_oto_offer_start_date']) ? 'NULL' : strtotime($_POST['ubam_oto_offer_start_date'])) . " , offer_end_date = " . (!strtotime($_POST['ubam_oto_offer_end_date']) ? 'NULL' : strtotime($_POST['ubam_oto_offer_end_date'])) . " WHERE offer_id = {$_POST['offerid']} ";
$wpdb->show_errors();
$update_results = $wpdb->query($update_query);
$wpdb->hide_errors();
if ($update_results === false) {
echo '<div class="updated"><p><strong><span style="color: red;">**ERROR**</span></strong> Unable to save changes.</p></div>';
} else {
echo '<div class="updated"><p>Success! Offer has been successfully changed.</p></div>';
}
}
$wpdb->show_errors();
$offerlist = $wpdb->get_results("SELECT * from {$wpdb->prefix}ubam_oto_offers ORDER BY offer", ARRAY_A);
$wpdb->hide_errors();
if (!is_array($offerlist))
$offerlist = array();
$admin_link_prefix = 'options-general.php?page=';
include_once(OTOMGR_TEMPLATE_DIR . "options-page.htm");
}
}
function getPageUrl($page)
{
global $wpdb;
if (eregi('http://', $page) || eregi('https://', $page))
return $page;
$post_ID = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_title = '$page' and post_type in ('page', 'post')");
return get_permalink($post_ID);
}
}
}
function ubam_oto_load_css_and_js()
{
}
if (preg_match("/one-time-offer/i", $_REQUEST['page'])) {
add_action('admin_head', 'ubam_oto_load_css_and_js');
}
?> |
|
|
|
|
|
|
|
|
|
Posted: Mon Nov 29, 2010 3:04 am |
|
|
klih |
Regular user |
|
|
Joined: Oct 12, 2010 |
Posts: 11 |
|
|
|
|
|
|
|
Thanks.
What was used to encode??? |
|
|
|
|
Posted: Mon Nov 29, 2010 3:25 am |
|
|
tsabitah |
Valuable expert |
|
|
Joined: Jul 07, 2010 |
Posts: 328 |
Location: surabaya |
|
|
|
|
|
|
change eval to highlight_string and run |
|
|
|
|
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
|
|
|
|
|
|