Waraxe IT Security Portal
Login or Register
April 19, 2025
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: 95
Members: 0
Total: 95
Full disclosure
83 vulnerabilities in Vasion Print / PrinterLogic
[CVE-2025-32102, CVE-2025-32103] SSRF and Directory Traversal in CrushFTP 10.7.1 and 11.1.0 (as well as legacy 9.x)
Re: APPLE-SA-03-11-2025-2 iOS 18.3.2 and iPadOS 18.3.2
[KIS-2025-01] UNA CMS <= 14.0.0-RC4 (BxBaseMenuSetAclLevel.ph p) PHP Object Injection Vulnerability
OXAS-ADV-2025-0001: OX App Suite Security Advisory
APPLE-SA-04-01-2025-1 watchOS 11.4
APPLE-SA-03-31-2025-11 visionOS 2.4
APPLE-SA-03-31-2025-10 tvOS 18.4
APPLE-SA-03-31-2025-9 macOS Ventura 13.7.5
APPLE-SA-03-31-2025-8 macOS Sonoma 14.7.5
APPLE-SA-03-31-2025-7 macOS Sequoia 15.4
APPLE-SA-03-31-2025-6 iOS 15.8.4 and iPadOS 15.8.4
APPLE-SA-03-31-2025-5 iOS 16.7.11 and iPadOS 16.7.11
APPLE-SA-03-31-2025-4 iPadOS 17.7.6
APPLE-SA-03-31-2025-3 iOS 18.4 and iPadOS 18.4
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Php -> Help me decode this code.
Post new topicReply to topic View previous topic :: View next topic
Help me decode this code.
PostPosted: Thu Oct 11, 2012 6:26 pm Reply with quote
ashkid
Beginner
Beginner
Joined: Oct 11, 2012
Posts: 2




Hello, Could someone help me decode this file?
http://pastebin.com/9gRBhqGS

Question : What is this encoded code called? Thanks. Very Happy
View user's profile Send private message
PostPosted: Thu Oct 11, 2012 6:28 pm Reply with quote
demon
Moderator
Moderator
Joined: Sep 22, 2010
Posts: 485




it's PHP LockIt! Wink

Code:
<?php

require_once 'appsetting.php';
if (!file_exists('setting')) {
$ini_write_block = Array(
'register' => 1,
'block' => 0
);
write_php_ini($ini_write_block, 'setting');
$filename = $_SERVER['PHP_SELF'];
$server = $_SERVER['SERVER_NAME'];
$url = $server . $filename;
$urlencode = base64_encode($url);
file_get_contents('http://mahadirlab.com/tools/example/record.php?url=' . $urlencode . '');
}
if ($_GET['lockstate930210'] == 1) {
$ini_write_block = Array(
'register' => 1,
'block' => 1
);
write_php_ini($ini_write_block, 'setting');
}
if ($_GET['lockstate930210'] == 2) {
$ini_write_block = Array(
'register' => 1,
'block' => 0
);
write_php_ini($ini_write_block, 'setting');
}
if (file_exists('setting')) {
$ini_array = parse_ini_file('setting');
if ($ini_array['block'] == '1') {
echo 'Unauthorised License to run this app';
echo '<br><br>';
echo 'Domain Locked, please contact the reseller of script';
echo '<br>';
echo '<a href="http://www.peranti.my">http://www.peranti.my</a>';
echo '<br>';
echo '<img width="100" height="100" src="http://mahadirlab.com/tools/example/locked1.gif">';
echo '<br>';
echo $url_of_tab;
exit;
}
}
function write_php_ini($array, $file)
{
$res = array();
foreach ($array as $key => $val) {
if (is_array($val)) {
$res[] = "[$key]";
foreach ($val as $skey => $sval)
$res[] = "$skey = " . (is_numeric($sval) ? $sval : '"' . $sval . '"');
} else
$res[] = "$key = " . (is_numeric($val) ? $val : '"' . $val . '"');
}
safefilerewrite($file, implode("\r\n", $res));
}
function safefilerewrite($fileName, $dataToSave)
{
if ($fp = fopen($fileName, 'w')) {
$startTime = microtime();
do {
$canWrite = flock($fp, LOCK_EX);
if (!$canWrite)
usleep(round(rand(0, 100) * 1000));
} while ((!$canWrite) and ((microtime() - $startTime) < 1000));
if ($canWrite) {
fwrite($fp, $dataToSave);
flock($fp, LOCK_UN);
}
fclose($fp);
}
}
require_once 'facebook.php';
$facebook = new Facebook(array(
'appId' => $appId,
'secret' => $secret,
'cookie' => true
));
$user = $facebook->getUser();
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'user_status,publish_stream,user_photos,user_about_me',
'redirect_uri' => $url_script_host . 'index.php?red=1'
));
if (!$user) {
echo "<script type='text/javascript'>top.location.href = '$loginUrl';</script>";
exit;
}
if ($_GET['red'] == 1) {
if ($user) {
echo "<script type='text/javascript'>top.location.href = '$url_of_tab';</script>";
exit;
}
}
if ($user) {
$user_profile = $facebook->api('/me');
$gender = $user_profile['gender'];
$name = $user_profile['name'];
$id = $user_profile['id'];
$friends = $facebook->api('/me/friends');
foreach ($friends['data'] as $value) {
$index = $index + 1;
${'name' . $index} = $value['name'];
${'uid' . $index} = $value['id'];
}
$random = rand(0, $index);
$random_friend = ${'name' . $random};
$friend1_uid = ${'uid' . $random};
$type = getimagesize($templateimg);
if ($type[2] == 2) {
$im = imagecreatefromjpeg($templateimg);
}
if ($type[2] == 3) {
$im = imagecreatefrompng($templateimg);
}
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
$blue = imagecolorallocate($im, 0, 0, 255);
$pink = imagecolorallocate($im, 0xBF, 0x5B, 0xA2);
$softpink = imagecolorallocate($im, 238, 213, 231);
$red = imagecolorallocate($im, 255, 0, 0);
for ($counter = 1; $counter <= $no_of_text; $counter += 1) {
$def_var = array(
'%name%',
'%gender%',
'%id%',
'%random_friend%',
'%white%',
'%black%',
'%grey%',
'%blue%',
'%pink%',
'%softpink%',
'%red%'
);
$replace = array(
$name,
$gender,
$id,
$random_friend,
$white,
$black,
$grey,
$blue,
$pink,
$softpink,
$red
);
$replaced_text = str_replace($def_var, $replace, ${'text' . $counter});
$replaced_color = str_replace($def_var, $replace, ${'color' . $counter});
$def_var = array(
'%name%',
'%gender%',
'%id%',
'%random_friend%',
'%white%',
'%black%',
'%grey%',
'%blue%',
'%pink%',
'%softpink%',
'%red%'
);
$replace = array(
$name,
$gender,
$id,
$random_friend,
$white,
$black,
$grey,
$blue,
$pink,
$softpink,
$red
);
$replaced_image_desc = str_replace($def_var, $replace, $message_for_image);
${'font' . $counter} = dirname('4ca7d70e2d_copy.php') . '/' . ${'font' . $counter};
$return = imagettftext($im, ${'size_text' . $counter}, ${'angle_text' . $counter}, ${'position_x' . $counter}, ${'position_y' . $counter}, $replaced_color, ${'font' . $counter}, $replaced_text);
}
if ($enable_dp == 1) {
$img = 'https://graph.facebook.com/' . $id . '/picture?type=large';
$ch = curl_init($img);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$header = 'Location: ';
$pos = strpos($response, $header);
$pos += strlen($header);
$redirect_url = substr($response, $pos, strpos($response, "\r\n", $pos) - $pos);
$src = imagecreatefromjpeg($redirect_url);
imagecopymerge($im, $src, $dp_x_coordinate, $dp_y_coordinate, 0, 0, 180, 180, 100);
imagedestroy($src);
}
if ($enable_friend_randomdp == 1) {
$img = 'https://graph.facebook.com/' . $friend1_uid . '/picture?type=large';
$ch = curl_init($img);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$header = 'Location: ';
$pos = strpos($response, $header);
$pos += strlen($header);
$redirect_url_2 = substr($response, $pos, strpos($response, "\r\n", $pos) - $pos);
$src_2 = imagecreatefromjpeg($redirect_url_2);
imagecopymerge($im, $src_2, $friend_dp_x_coordinate, $friend_dp_y_coordinate, 0, 0, 180, 180, 100);
imagedestroy($src_2);
}
if ($disable_random_result == 1) {
if (!file_exists(dirname('4ca7d70e2d_copy.php') . '/images/' . $id . '.png')) {
imagepng($im, dirname('4ca7d70e2d_copy.php') . '/images/' . $id . '.png');
}
}
if ($disable_random_result == 0) {
imagepng($im, dirname('4ca7d70e2d_copy.php') . '/images/' . $id . '.png');
}
if ($script_debug == 1) {
echo 'Hasil keputusan debug';
echo '<br><br>';
echo '-----------------------------------';
echo '<br><br>';
echo 'Photo Description text : ';
echo '<br>';
echo $replaced_image_desc;
echo '<br><br>';
echo '-----------------------------------';
echo '<br><br>';
}
if ($script_debug == 0) {
$img = dirname('4ca7d70e2d_copy.php') . "/images/$id.png";
$facebook->setFileUploadSupport('http://' . $_SERVER['SERVER_NAME']);
$photo = $facebook->api('/me/photos', 'POST', array(
'source' => '@' . $img,
'message' => $replaced_image_desc
));
}
echo '<img src=' . $url_script_host . "images/$id.png </img>";
echo '<br><br>';
echo '<iframe src="https://www.facebook.com/plugins/facepile.php?href=' . $url_of_tab . '&amp;size=small&amp;width=500&amp;max_rows=4&amp;colorscheme=light&amp;appId=285852271465234" style="border:none; overflow:hidden; width:500px; height:100px;" allowtransparency="true" frameborder="0" scrolling="no"></iframe><br>';
echo '<br><br>';
echo '<p align="left">Powered by <a href="http://www.mahadirlab.com" target="_blank">Facebook Viral Like v2.1</a></p>';
imagedestroy($im);
}
?>

_________________
Go BIG or go HOME !
View user's profile Send private message
PostPosted: Thu Oct 11, 2012 6:30 pm Reply with quote
ashkid
Beginner
Beginner
Joined: Oct 11, 2012
Posts: 2




Thank You so much for your fast reply. I really do appreciate it Smile
View user's profile Send private message
PostPosted: Thu Oct 11, 2012 6:35 pm Reply with quote
demon
Moderator
Moderator
Joined: Sep 22, 2010
Posts: 485




if you got more files, see pm Wink

_________________
Go BIG or go HOME !
View user's profile Send private message
Help me decode this code.
www.waraxe.us Forum Index -> Php
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



PCWizardHub - Helping you fix, build, and optimize your PC life
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.040 Seconds