Waraxe IT Security Portal
Login or Register
July 27, 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: 198
Members: 0
Total: 198
Full disclosure
CyberDanube Security Research 20240722-0 | Multiple Vulnerabilities in Perten/PerkinElmer ProcessPlus
[KIS-2024-06] XenForo <= 2.2.15 (Template System) Remote Code Execution Vulnerability
[KIS-2024-05] XenForo <= 2.2.15 (Widget::actionSave) Cross-Site Request Forgery Vulnerability
CVE-2024-33326
CVE-2024-33327
CVE-2024-33328
CVE-2024-33329
CyberDanube Security Research 20240703-0 | Authenticated Command Injection in Helmholz Industrial Router REX100
SEC Consult SA-20240627-0 :: Local Privilege Escalation via MSI installer in SoftMaker Office / FreeOffice
SEC Consult SA-20240626-0 :: Multiple Vulnerabilities in Siemens Power Automation Products
Novel DoS Vulnerability Affecting WebRTC Media Servers
APPLE-SA-06-25-2024-1 AirPods Firmware Update 6A326, AirPods Firmware Update 6F8, and Beats Firmware Update 6F8
40 vulnerabilities in Toshiba Multi-Function Printers
17 vulnerabilities in Sharp Multi-Function Printers
SEC Consult SA-20240624-0 :: Multiple Vulnerabilities allowing complete bypass in Faronics WINSelect (Standard + Enterprise)
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.125 Seconds