|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
Help me decode this code. |
|
Posted: Thu Oct 11, 2012 6:26 pm |
|
|
ashkid |
Beginner |
|
|
Joined: Oct 11, 2012 |
Posts: 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Thu Oct 11, 2012 6:28 pm |
|
|
demon |
Moderator |
|
|
Joined: Sep 22, 2010 |
Posts: 485 |
|
|
|
|
|
|
|
it's PHP LockIt!
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 . '&size=small&width=500&max_rows=4&colorscheme=light&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 ! |
|
|
|
|
|
|
|
Posted: Thu Oct 11, 2012 6:30 pm |
|
|
ashkid |
Beginner |
|
|
Joined: Oct 11, 2012 |
Posts: 2 |
|
|
|
|
|
|
|
Thank You so much for your fast reply. I really do appreciate it |
|
|
|
|
Posted: Thu Oct 11, 2012 6:35 pm |
|
|
demon |
Moderator |
|
|
Joined: Sep 22, 2010 |
Posts: 485 |
|
|
|
|
|
|
|
if you got more files, see pm |
|
_________________ Go BIG or go HOME ! |
|
|
|
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
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|