Waraxe IT Security Portal
Login or Register
November 24, 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: 66
Members: 0
Total: 66
Full disclosure
APPLE-SA-11-19-2024-5 macOS Sequoia 15.1.1
Local Privilege Escalations in needrestart
APPLE-SA-11-19-2024-4 iOS 17.7.2 and iPadOS 17.7.2
APPLE-SA-11-19-2024-3 iOS 18.1.1 and iPadOS 18.1.1
APPLE-SA-11-19-2024-2 visionOS 2.1.1
APPLE-SA-11-19-2024-1 Safari 18.1.1
Reflected XSS - fronsetiav1.1
XXE OOB - fronsetiav1.1
St. Poelten UAS | Path Traversal in Korenix JetPort 5601
St. Poelten UAS | Multiple Stored Cross-Site Scripting in SEH utnserver Pro
Apple web content filter bypass allows unrestricted access to blocked content (macOS/iOS/iPadOS/visionO S/watchOS)
SEC Consult SA-20241112-0 :: Multiple vulnerabilities in Siemens Energy Omnivise T3000 (CVE-2024-38876, CVE-2024-38877, CVE-2024-38878, CVE-2024-38879)
Security issue in the TX Text Control .NET Server for ASP.NET.
SEC Consult SA-20241107-0 :: Multiple Vulnerabilities in HASOMED Elefant and Elefant Software Updater
Unsafe eval() in TestRail CLI
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.043 Seconds