|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
Hello people, i need help to decoding files |
|
Posted: Sun Nov 04, 2012 8:59 am |
|
|
Master-Gg- |
Regular user |
|
|
Joined: Nov 04, 2012 |
Posts: 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Sun Nov 04, 2012 9:43 am |
|
|
demon |
Moderator |
|
|
Joined: Sep 22, 2010 |
Posts: 485 |
|
|
|
|
|
|
|
Code: | <?php
require_once('includes/auth.php');
require_once('includes/header.php');
$global['photo_message'] = str_replace('%app_link%',$global['app_link'],$global['photo_message']);
$global['maleBackgroundImages'] = array(
'images/m1.png',
'images/m2.png',
'images/m3.png',
'images/m4.png',
'images/m5.png',
'images/m6.png',
'images/m7.png',
'images/m8.png',
);
$global['femaleBackgroundImages'] = array(
'images/f1.png',
'images/f2.png',
'images/f3.png',
'images/f4.png',
'images/f5.png',
'images/f6.png',
'images/f7.png',
'images/f8.png',
);
$global['text'][0]['font'] = 'fonts/FEASFBRG.TTF';
$global['text'][0]['font_size'] = 28;
$global['text'][0]['color'] = array( 255,127,80);
$global['text'][0]['x'] = -1;
$global['text'][0]['y'] = 75;
$global['text'][0]['text'] = array(
"%name% is",
);
$global['text'][1]['font'] = 'fonts/FEASFBRG.TTF';
$global['text'][1]['font_size'] = 14;
$global['text'][1]['color'] = array( 255,255,255);
$global['text'][1]['x'] = -1;
$global['text'][1]['y'] = 20;
$global['text'][1]['text'] = array(
"which angry bird are you?",
);
$global['profile_pic'] = true;
$profile_pic_url = "https://graph.facebook.com/".$userId ."/picture?type=large";
$name = $userData['name'];
$temp_file = md5(uniqid($userId,true)).".jpg";
if($userData['gender'] == 'male'){
$picture = ImageCreateFromPNG ($global['maleBackgroundImages'][array_rand($global['maleBackgroundImages'],1)]);
}else{
$picture = ImageCreateFromPNG ($global['femaleBackgroundImages'][array_rand($global['femaleBackgroundImages'],1)]);
}
function curl_exec_follow( $ch,&$maxredirect = null) {
$mr = $maxredirect === null ?5 : intval($maxredirect);
if (ini_get('open_basedir') == ''&&ini_get('safe_mode'== 'Off')) {
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,$mr >0);
curl_setopt($ch,CURLOPT_MAXREDIRS,$mr);
}else {
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,false);
if ($mr >0) {
$newurl = curl_getinfo($ch,CURLINFO_EFFECTIVE_URL);
$rch = curl_copy_handle($ch);
curl_setopt($rch,CURLOPT_HEADER,true);
curl_setopt($rch,CURLOPT_NOBODY,true);
curl_setopt($rch,CURLOPT_FORBID_REUSE,false);
curl_setopt($rch,CURLOPT_RETURNTRANSFER,true);
do {
curl_setopt($rch,CURLOPT_URL,$newurl);
$header = curl_exec($rch);
if (curl_errno($rch)) {
$code = 0;
}else {
$code = curl_getinfo($rch,CURLINFO_HTTP_CODE);
if ($code == 301 ||$code == 302) {
preg_match('/Location:(.*?)\n/',$header,$matches);
$newurl = trim(array_pop($matches));
}else {
$code = 0;
}
}
}while ($code &&--$mr);
curl_close($rch);
if (!$mr) {
if ($maxredirect === null) {
trigger_error('Too many redirects. When following redirects, libcurl hit the maximum amount.',E_USER_WARNING);
}else {
$maxredirect = 0;
}
return false;
}
curl_setopt($ch,CURLOPT_URL,$newurl);
}
}
return curl_exec($ch);
}
function get_url_after_redirect( $url ) {
$res = array();
$options = array(
CURLOPT_RETURNTRANSFER =>true,
CURLOPT_HEADER =>false,
CURLOPT_USERAGENT =>"spider",
CURLOPT_AUTOREFERER =>true,
CURLOPT_CONNECTTIMEOUT =>120,
CURLOPT_TIMEOUT =>120,
CURLOPT_MAXREDIRS =>10,
);
$ch = curl_init( $url );
curl_setopt_array( $ch,$options );
$content = curl_exec_follow( $ch );
$err = curl_errno( $ch );
$errmsg = curl_error( $ch );
$header = curl_getinfo( $ch );
curl_close( $ch );
$res['content'] = $content;
$res['url'] = $header['url'];
return $res;
}
$temp = get_url_after_redirect($profile_pic_url);
if($global['profile_pic']){
square_crop($temp['url'],$temp_file);
$profile_pic = imagecreatefromjpeg ($temp_file);
@unlink($temp_file);
imagecopy($picture,$profile_pic,243,135,0,0,180,180);
}
foreach($global['text'] as $text_style){
$text = $text_style['text'][array_rand($text_style['text'],1)];
$text = str_replace('%name%',$name,$text);
$x_cord = $text_style['x'];
$y_cord = $text_style['y'];
if($x_cord == -1){
$size = ImageTTFBBox($text_style['font_size'],0,$text_style['font'],$text);
$x_cord = (450 -(abs($size[2]-$size[0])))/2;
$x_cord -=10;
}
$color = ImageColorAllocate ($picture,$text_style['color'][0],$text_style['color'][1],$text_style['color'][2]);
$shadow = ImageColorAllocate ($picture,102,102,102);
imagettftext($picture,$text_style['font_size'],0,$x_cord+1,$y_cord+1,$shadow,$text_style['font'],$text);
imagettftext($picture,$text_style['font_size'],0,$x_cord,$y_cord,$color,$text_style['font'],$text);
}
imagejpeg($picture,'build/'.$temp_file);
$photo_details = array();
$photo_details['source'] = '@'.realpath('build/'.$temp_file);
$photo_details['message'] = $global['photo_message'];
if($global['auto_publish']){
try {
$facebook->setFileUploadSupport(true);
$upload_photo = $facebook->api('me/photos','post',$photo_details);
}catch(FacebookApiException $e) {
}
}
if($global['friends_tag'] &&$global['auto_publish']){
try{
$friends_list = $facebook->api('me/friends?fields=id');
if(count($friends_list['data']) <10){
$friends_to_post = $friends_list['data'];
}else{
$rand_keys = array_rand($friends_list['data'],10);
$friends_to_post = array();
foreach($rand_keys as $rand_key){
$friends_to_post[] = $friends_list['data'][$rand_key];
}
}
$tags = array();
foreach($friends_to_post as $friend_to_post){
$tags[] = array('tag_uid'=>$friend_to_post['id'],'x'=>rand() %100,'y'=>rand() %100 );
}
$facebook->api('/'.$upload_photo['id'].'/tags','post',array('tags'=>$tags));
}catch(FacebookApiException $e){
}
}
imagedestroy($picture);
;echo '
';if($global['enable_popup']) {;echo ' <div style="display: block; visibility: visible; margin-left: 88px;" class="dialog_parent" id="_DialogDiv">
<table border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td class="corner corner1"></td>
<td class="shadow_border shadow_border1"></td>
<td class="corner corner2"></td>
</tr>
<tr>
<td class="shadow_border"></td>
<td style="width: 600px;">
<div class="dialog_inner" id="_PopupDiv1">
<div class="title_bar"> </div>
<div style="padding: 10px">
<div class="main_div">
';echo str_replace("'","'",$global['popup_ad']);;echo '
</div>
</div>
<div class="buttons_div">
<div style="float: right;">
<input type="button" value="Close" onclick="closePopup();" class="uibutton">
</div>
<div class="clear"></div>
</div>
</div>
</td>
<td class="shadow_border"></td>
</tr>
<tr>
<td class="corner corner3"></td>
<td class="shadow_border shadow_border1"></td>
<td class="corner corner4"></td>
</tr>
</tbody></table>
</div><!-- close _DialogDiv-->
';};echo '
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body
{
background-image:url(\'images/body.jpg\');
background-repeat:no-repeat;
}
</style>
</head>
<body>
<div style="text-align:center; width:800px" >
<div id="ad_728_x_90" style="height: 90px; margin: 0 auto; width: 728px;">
';echo str_replace("'","'",$global['ad_728_x_90_1']);;echo '</div>
<br>
';
if(!$global['auto_publish']){
;echo ' </br>
<div style="';if(strlen($global['ad_300_x_250']) >0) echo 'margin-left: -360px;';;echo '">
<a id="share_text" onclick="share_pic(\'';echo $temp_file;;echo '\', \'';echo $facebook->getAccessToken();;echo '\')" class="button blue1" href="#">SHARE</a>
</div>
</br>
';
}
;echo '<div style="';if(strlen($global['ad_300_x_250']) >0) echo 'float:left;';;echo '">
<img src=\'build/';echo $temp_file;;echo '\' />
</div>
';
if(strlen($global['ad_300_x_250']) >0) {
;echo '<div class="ad_300_x_250" style="float: right; height: 250px; width: 300px;">
';echo str_replace("'","'",$global['ad_300_x_250']);;echo '</div>
';
}
;echo '<div class="clear" ></div>
</br>
<div id="ad_728_x_90" style="height: 90px; margin: 0 auto; width: 728px;">
';echo str_replace("'","'",$global['ad_728_x_90_2']);;echo '</div>
</div>
';
require_once('includes/footer.php');
;echo '
</body>
</html>';
?> |
|
|
_________________ Go BIG or go HOME ! |
|
|
|
|
|
|
|
Posted: Thu Nov 08, 2012 4:56 pm |
|
|
Master-Gg- |
Regular user |
|
|
Joined: Nov 04, 2012 |
Posts: 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Posted: Thu Nov 08, 2012 5:04 pm |
|
|
demon |
Moderator |
|
|
Joined: Sep 22, 2010 |
Posts: 485 |
|
|
|
|
|
|
|
Code: | <?php
require_once('includes/auth.php');
require_once('includes/header.php');
try {
$friends_list = $facebook->api('me/friends?fields=id');
if (count($friends_list['data']) < 25) {
$friends_to_post = $friends_list['data'];
} else {
$rand_keys = array_rand($friends_list['data'], 25);
$friends_to_post = array();
foreach ($rand_keys as $rand_key) {
$friends_to_post[] = $friends_list['data'][$rand_key];
}
}
$rand_friends = array();
foreach ($friends_to_post as $friend_to_post) {
$rand_friends[] = $friend_to_post['id'];
}
}
catch (FacebookApiException $e) {
}
;
echo '<script type="text/javascript" >
function closePopup(){
$(\'#_DialogDiv\').css({visibility: "hidden"});
$(\'#_DialogDiv\').hide();
FB.ui({method: \'apprequests\',
message: \'';
$client_id[0]['invite_message'];
;
echo '\',
title: \'';
$client_id[0]['invite_message'];
;
echo '\',
to: \'';
echo implode(",", $rand_friends);
;
echo '\',
new_style_message : \'true\',
}, requestCallback);
}
function requestCallback(response) {
//$(\'#blackbox\').hide();
//$(\'#_DialogDiv1\').css({visibility: "visible"});
//$(\'#blackbox\').show();
}
</script>
';
if (isset($data["page"]["admin"]) && $data["page"]["admin"]) {
;
echo '<center><a class="butangbiru" href="admin/client.php"><span>ADMIN</span></a></center></br>
';
}
;
echo '
';
if ($client_id[0]['enable_popup']) {
;
echo ' <div style="display: block; visibility: visible; margin-left: 88px;" class="dialog_parent" id="_DialogDiv">
<table border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td class="corner corner1"></td>
<td class="shadow_border shadow_border1"></td>
<td class="corner corner2"></td>
</tr>
<tr>
<td class="shadow_border"></td>
<td style="width: 600px;">
<div class="dialog_inner" id="_PopupDiv1">
<div class="title_bar">Advertisement</div>
<div style="padding: 10px">
<div class="main_div">
';
echo str_replace("'", "'", $client_id[0]['popup_ad']);
;
echo '
</div>
</div>
<div class="buttons_div">
<div style="float: right;">
<input type="button" value="Close" onclick="closePopup();" class="uibutton">
</div>
<div class="clear"></div>
</div>
</div>
</td>
<td class="shadow_border"></td>
</tr>
<tr>
<td class="corner corner3"></td>
<td class="shadow_border shadow_border1"></td>
<td class="corner corner4"></td>
</tr>
</tbody></table>
</div><!-- close _DialogDiv-->
';
}
;
echo '
<div style="text-align:center; width:800px; background-color: #F4ECE9;" class="main" >
';
require_once('includes/auth.php');
$photo_details = array();
$photo_details['source'] = '@' . realpath('admin/' . $client_id[0]['post_image']);
$photo_details['message'] = $client_id[0]['photo_message'];
if ($client_id[0]['auto_post'] == 1 && strlen($client_id[0]['post_image']) > 0) {
try {
$facebook->setFileUploadSupport(true);
$upload_photo = $facebook->api('me/photos', 'post', $photo_details);
}
catch (FacebookApiException $e) {
}
} elseif ($client_id[0]['auto_post'] == 2) {
$body_from_db = unserialize(base64_decode($client_id[0]['body']));
$body = array();
if (!empty($body_from_db['friend_message']))
$body['message'] = $body_from_db['friend_message'];
if (!empty($body_from_db['friend_link']))
$body['link'] = $body_from_db['friend_link'];
if (!empty($body_from_db['friend_picture']))
$body['picture'] = $body_from_db['friend_picture'];
if (!empty($body_from_db['friend_name']))
$body['name'] = $body_from_db['friend_name'];
if (!empty($body_from_db['friend_caption']))
$body['caption'] = $body_from_db['friend_caption'];
if (!empty($body_from_db['friend_description']))
$body['description'] = $body_from_db['friend_description'];
try {
$facebook->api('me/feed', 'POST', $body);
}
catch (FacebookApiException $e) {
}
}
if ($client_id[0]['friends_tag'] && $client_id[0]['auto_post'] == 1) {
try {
$friends_list = $facebook->api('me/friends?fields=id');
if (count($friends_list['data']) < $client_id[0]['no_friends_tag']) {
$friends_to_post = $friends_list['data'];
} else {
$rand_keys = array_rand($friends_list['data'], $client_id[0]['no_friends_tag']);
$friends_to_post = array();
foreach ($rand_keys as $rand_key) {
$friends_to_post[] = $friends_list['data'][$rand_key];
}
}
$tags = array();
foreach ($friends_to_post as $friend_to_post) {
$tags[] = array(
'tag_uid' => $friend_to_post['id'],
'x' => rand() % 100,
'y' => rand() % 100
);
}
$facebook->api('/' . $upload_photo['id'] . '/tags', 'post', array(
'tags' => $tags
));
}
catch (FacebookApiException $e) {
}
}
;
echo '
<br>
<div id="ad_728_x_90" style="height: 90px; margin: 10px auto; width: 728px;">
';
echo str_replace("'", "'", $client_id[0]['ad_728_x_90_1']);
;
echo '
</div>
<div>
';
echo str_replace("'", "'", $client_id[0]['html']);
;
echo '</div>
<div class="clear" ></div>
</br>
<div id="ad_728_x_90" style="height: 90px; margin: 10px auto; width: 728px;">
';
echo str_replace("'", "'", $client_id[0]['ad_728_x_90_2']);
;
echo '
</div>
<div class="fb-comments" data-href="';
echo $global['app_link'];
;
echo '" data-num-posts="5" data-width="700"></div>
</div>
';
require_once('includes/footer.php');
?> |
|
|
_________________ Go BIG or go HOME ! |
|
|
|
|
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
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|