!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

E:\xampp\xampp\htdocs\phpbb\attach_mod\includes\   drwxrwxrwx
Free 7.97 GB of 239.26 GB (3.33%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     functions_filetypes.php (6.77 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/***************************************************************************
 *                            functions_filetypes.php
 *                            -------------------
 *   begin                : Sat, Jul 27, 2002
 *   copyright            : (C) 2002 Meik Sievertsen
 *   email                : acyd.burn@gmx.de
 *
 *   $Id: functions_filetypes.php,v 1.3 2003/01/15 23:24:26 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *
 ***************************************************************************/

//
// All Attachment Functions needed to determine Special Files/Dimensions
//

//
// Read Long Int (4 Bytes) from File
//
function read_longint($fp)
{
    
$data fread($fp4);

    
$value ord($data[0]) + (ord($data[1])<<8)+(ord($data[2])<<16)+(ord($data[3])<<24);
    if (
$value >= 4294967294)
    {
        
$value -= 4294967296;
    }

    return (
$value);
}

//
// Read Word (2 Bytes) from File - Note: It's an Intel Word
//
function read_word($fp)
{
    
$data fread($fp2);

    
$value ord($data[1]) * 256 ord($data[0]);
    
    return (
$value);
}

//
// Read Byte
//
function read_byte($fp)
{
    
$data fread($fp1);

    
$value ord($data);
    
    return (
$value);
}

//
// Get Image Dimensions
//
function image_getdimension($file)
{

    
$size = @getimagesize($file);

    if ( (
$size[0] != 0) || ($size[1] != 0) )
    {
        return (
$size);
    }

    
// Try to get the Dimension manually, depending on the mimetype
    
$fp = @fopen($file'rb');
    if (!
$fp)
    {
        return (
$size);
    }
    
    
$error FALSE;

    
//
    // BMP - IMAGE
    //
    
$tmp_str fread($fp2);
    if (
$tmp_str == 'BM')
    {
        
$length read_longint($fp);

        if (
$length <= 6)
        {
            
$error TRUE;
        }

        if (!
$error)
        {
            
$i read_longint($fp); 
            if ( 
$i != 0)
            {          
                
$error TRUE;
            }
        }

        if (!
$error)
        {
            
$i read_longint($fp);

            if ( (
$i != 0x3E) && ($i != 0x76) && ($i != 0x436) && ($i != 0x36) )
            {
                
$error TRUE;
            }
        }

        if (!
$error)
        {
            
$tmp_str fread($fp4); 
            
$width read_longint($fp); 
            
$height read_longint($fp);

            if ( (
$width 3000) || ($height 3000) )
            {
                
$error TRUE;
            }
        }
    }
    else
    {
        
$error TRUE;
    }

    if (!
$error)
    {
        
fclose($fp);
        return array(
            
$width,
            
$height,
            
'6'
        
);
    }
    
    
$error FALSE;
    
fclose($fp);

    
//
    // GIF - IMAGE
    //
    
$fp = @fopen($file'rb');

    
$tmp_str fread($fp3);
    
    if (
$tmp_str == 'GIF')
    {
        
$tmp_str fread($fp3);
        
$width read_word($fp);
        
$height read_word($fp);

        
$info_byte fread($fp1);
        
$info_byte ord($info_byte);
        if ( ((
$info_byte 0x80) != 0x80) && (($info_byte 0x80) != 0) )
        {
            
$error TRUE;
        }
        
        if (!
$error)
        {
            if ((
$info_byte 8) != 0)
            {
                
$error TRUE;
            }

        }
    }
    else
    {
        
$error TRUE;
    }

    if (!
$error)
    {
        
fclose($fp);
        return array(
            
$width,
            
$height,
            
'1'
        
);
    }
    
    
$error FALSE;
    
fclose($fp);

    
//
    // JPG - IMAGE
    //
    
$fp = @fopen($file'rb');

    
$tmp_str fread($fp4);
    
$w1 read_word($fp);
    if (
intval($w1) < 16)
    {
        
$error TRUE;
    }
    
    if (!
$error)
    {
        
$tmp_str fread($fp4);
        if (
$tmp_str == 'JFIF')
        {
            
$o_byte fread($fp1);
            if (
intval($o_byte) != 0)
            {
                
$error TRUE;
            }

            if (!
$error)
            {
                
$str fread($fp2);
                
$b read_byte($fp);

                if ( ( 
$b != 0) && ($b != 1) && ($b != 2) )
                {          
                    
$error TRUE;
                }
            }

            if (!
$error)
            {
                
$width read_word($fp);
                
$height read_word($fp);

                if ( (
$width <= 0) || ($height <= 0) )
                {
                    
$error TRUE;
                }
            }
        }
    }
    else
    {
        
$error TRUE;
    }

    if (!
$error)
    {
        
fclose($fp);
        return array(
            
$width,
            
$height,
            
'2'
        
);
    }
    
    
$error FALSE;
    
fclose($fp);

    
//
    // PCX - IMAGE
    //
    
$fp = @fopen($file'rb');

    
$tmp_str fread($fp3);
    
    if ( ((
ord($tmp_str[0]) == 10)) && ( (ord($tmp_str[1]) == 0) || (ord($tmp_str[1]) == 2) || (ord($tmp_str[1]) == 3) || (ord($tmp_str[1]) == 4) || (ord($tmp_str[1]) == 5) ) && (    (ord($tmp_str[2]) == 1) ) )
    {
        
$b fread($fp1);

        if ( (
ord($b) != 1) && (ord($b) != 2) && (ord($b) != 4) && (ord($b) != 8) && (ord($b) != 24) )
        {
            
$error TRUE;
        }

        if (!
$error)
        {
            
$xmin read_word($fp);
            
$ymin read_word($fp);
            
$xmax read_word($fp);
            
$ymax read_word($fp);
            
$tmp_str fread($fp52);
      
            
$b fread($fp1);
            if (
$b != 0)
            {
                
$error TRUE;
            }
        }

        if (!
$error)
        {
            
$width $xmax $xmin 1;
            
$height $ymax $ymin 1;
        }
    }
    else
    {
        
$error TRUE;
    }

    if (!
$error)
    {
        
fclose($fp);
        return array(
            
$width,
            
$height,
            
'7'
        
);
    }
    
    
fclose($fp);
    return (
$size);
}

//
// Flash MX Support
// Routines and Methods are from PhpAdsNew (www.sourceforge.net/projects/phpadsnew)
//
define('swf_tag_compressed'chr(0x43).chr(0x57).chr(0x53));
define('swf_tag_identify'chr(0x46).chr(0x57).chr(0x53));

function 
swf_bits($buffer$pos$count)
{
    
$result 0;
    
    for (
$loop $pos$loop $pos $count$loop++)
    {
        
$result $result + ((((ord($buffer[(int)($loop 8)])) >> (- ($loop 8))) & 0x01) << ($count - ($loop $pos) - 1));
    }
    return 
$result;
}

function 
swf_decompress($buffer)
{
    if ((
function_exists('gzuncompress')) && (substr($buffer03) == swf_tag_compressed) && (ord(substr($buffer31)) >= 6) )
    {
        
// Only decompress relevant Informations
        
$output  'F';
        
$output .= substr ($buffer17);
        
$output .= gzuncompress (substr ($buffer8));
        
        return (
$output);
    }
    else
    {
        return (
$buffer);
    }
}

function 
swf_getdimension($file)
{

    
$size = @getimagesize($file);

    if ( (
$size[0] != 0) || ($size[1] != 0) )
    {
        return (
$size);
    }

    
// Try to get the Dimension manually
    
$fp = @fopen($file'rb');
    if (!
$fp)
    {
        return (
$size);
    }
    
    
$error FALSE;

    
//
    // SWF - FLASH FILE
    //
    
$fp = @fopen($file'rb');

    
// Decompress if file is a Flash MX compressed file
    
$buffer fread($fp1024);
    
    if ( (
substr($buffer03) == swf_tag_identify) || (substr($buffer03) == swf_tag_compressed) )
    {
        if (
substr($buffer03) == swf_tag_compressed)
        {
            
fclose($fp);
            
$fp = @fopen($file'rb');
            
$buffer fread($fpfilesize($file));
            
$buffer swf_decompress($buffer);
        }
    
        
// Get size of rect structure
        
$bits swf_bits ($buffer645);

        
// Get rect
        
$width  = (int)(swf_bits ($buffer69 $bits$bits) - swf_bits ($buffer69$bits)) / 20;
        
$height = (int)(swf_bits ($buffer69 + ($bits), $bits) - swf_bits ($buffer69 + ($bits), $bits)) / 20;
    }
    else
    {
        
$error TRUE;
    }

    if (!
$error)
    {
        
fclose($fp);
        return array(
            
$width,
            
$height,
            
'2'
        
);
    }
    
    
fclose($fp);
    return (
$size);
}

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0312 ]--