Waraxe IT Security Portal
Login or Register
December 21, 2024
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 189
Members: 0
Total: 189
Full disclosure
Stored XSS with Filter Bypass - blogenginev3.3.8
[SYSS-2024-085]: Broadcom CA Client Automation - Improper Privilege Management (CWE-269)
[KIS-2024-07] GFI Kerio Control <= 9.4.5 Multiple HTTP Response Splitting Vulnerabilities
RansomLordNG - anti-ransomware exploit tool
APPLE-SA-12-11-2024-9 Safari 18.2
APPLE-SA-12-11-2024-8 visionOS 2.2
APPLE-SA-12-11-2024-7 tvOS 18.2
APPLE-SA-12-11-2024-6 watchOS 11.2
APPLE-SA-12-11-2024-5 macOS Ventura 13.7.2
APPLE-SA-12-11-2024-4 macOS Sonoma 14.7.2
APPLE-SA-12-11-2024-3 macOS Sequoia 15.2
APPLE-SA-12-11-2024-2 iPadOS 17.7.3
APPLE-SA-12-11-2024-1 iOS 18.2 and iPadOS 18.2
SEC Consult SA-20241211-0 :: Reflected Cross-Site Scripting in Numerix License Server Administration System Login
St. Poelten UAS | Multiple Vulnerabilities in ORing IAP
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> PHP script decode requests -> Previously unseen PHP encoding, a challenge!
Post new topicReply to topic View previous topic :: View next topic
Previously unseen PHP encoding, a challenge!
PostPosted: Thu Dec 19, 2013 1:57 pm Reply with quote
bs000
Beginner
Beginner
Joined: Dec 19, 2013
Posts: 1




Try and decode this, good luck! If you do manage to decrypt, please name tools :)
View user's profile Send private message
PostPosted: Thu Dec 19, 2013 4:51 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Just replace "eval" with "print" Smile

Code:

function check_serial_valid() {
$host = $_SERVER['HTTP_HOST'];

if (preg_match("/^(www.)(.*)/si", $host, $matches)) {
$wwwhost = $host;
$nonwwwhost = preg_replace("/^(www.)?/si", "", $wwwhost);
} else {
$nonwwwhost = $host;
$wwwhost = "www." . $host;
}

if ($_SERVER['HTTP_HOST'] == "localhost" || $_SERVER['HTTP_HOST'] == "localhost:" . $_SERVER['SERVER_PORT']) {
return true;
} else {
if ($serial = wls_get_serial()) {

if (function_exists("curl_exec")) {

$serial = get_option('wls_license');
$prod_name = LICENSEMANAGER_NAME;
//$domain = $_SERVER['HTTP_HOST'];
$domain = $_SERVER['SERVER_NAME'];
if (substr($domain, 0, 4) == "www.") { $domain = substr($domain, 4);}
$userip = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
$ip = gethostbyname($domain);

$validdir = dirname(__FILE__);
$validdomain = str_replace("www.", "", $domain);

$key_info['key'] = $serial;
$key_info['domain'] = $validdomain;
$key_info['validip'] = $userip;
$key_info['validdir'] = $validdir;
$key_info['product'] = $prod_name;

$serverurl = "http://shop.wpbuz.com/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $serverurl."wp-content/plugins/wp-licensing/auth/verify.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $key_info);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);

$results = array();
$result = json_decode($result, true);

if($result['valid'] == "true"){
return true;
} else {
if ($serial == strtoupper(md5($_SERVER['HTTP_HOST'] . "wpDEVpro" . "myb3mb3sc3nt1ks3k4l1w35w35"))) {
return true;
} elseif (strtoupper(md5($wwwhost . "wpDEVpro" . "myb3mb3sc3nt1ks3k4l1w35w35")) == $serial ||
strtoupper(md5($nonwwwhost . "wpDEVpro" . "myb3mb3sc3nt1ks3k4l1w35w35")) == $serial) {
return true;
} else {
$key_info['product'] = $prod_name;
$serverurl = "http://wpbuz.com/ev/check.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $serverurl);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 43200);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $key_info);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);

$results = array();
$result = json_decode($result, true);

if($result['valid'] == "true"){
return true;
}
}
}

} else {

if ($serial == strtoupper(md5($_SERVER['HTTP_HOST'] . "wpDEVpro" . "myb3mb3sc3nt1ks3k4l1w35w35"))) {
return true;
} elseif (strtoupper(md5($wwwhost . "wpDEVpro" . "myb3mb3sc3nt1ks3k4l1w35w35")) == $serial ||
strtoupper(md5($nonwwwhost . "wpDEVpro" . "myb3mb3sc3nt1ks3k4l1w35w35")) == $serial) {
return true;
}
}

}
}
return false;
}
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sat Dec 21, 2013 12:02 am Reply with quote
Cyko
Moderator
Moderator
Joined: Jul 21, 2009
Posts: 375




Nice work although I would opt for highlight_string over print/echo anyday, for those unaware of this nifty function refer to php.net to see the benefits/reasons why. Smile
View user's profile Send private message
Previously unseen PHP encoding, a challenge!
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

Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.046 Seconds