Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.188.195.90
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
cnv /
bnu /
custom_src /
[ HOME SHELL ]
Name
Size
Permission
Action
admin.php
6.86
KB
-rwxr-xr-x
cManualMailer.php
1.38
KB
-rwxr-xr-x
candidate_certificate.php
7.6
KB
-rwxr-xr-x
common_data.php
1.91
KB
-rwxr-xr-x
dash_board_client.php
4.4
KB
-rwxr-xr-x
dashboard_customer.php
13.56
KB
-rwxr-xr-x
display_custom_html.php
8.47
KB
-rwxr-xr-x
execute_query.php
754
B
-rwxr-xr-x
get_commmon_data.php
3.76
KB
-rwxr-xr-x
pending_certificate.php
8.15
KB
-rwxr-xr-x
phpinfo.php
19
B
-rwxr-xr-x
sendGridMail.php
1.29
KB
-rwxr-xr-x
sendsmsapi.php
1014
B
-rwxr-xr-x
student.php
33.81
KB
-rwxr-xr-x
test.php
3.38
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : admin.php
<?php error_reporting(E_ALL); ini_set('display_errors', 'on'); require_once(_DIR_."/../../../aws/aws-autoloader.php"); use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; function downloadstudentphotozip($aobj_context) { //session_start(); //echo "string"; $FUNIVCODE = '023'; $s3 = S3Client::factory( array( 'credentials' => array( 'key' => IAM_KEY, 'secret' => IAM_SECRET ), 'version' => "latest", 'region' => 'ap-south-1' ) ); $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); $fromdate = $aobj_context->mobj_data["fromdate"]; $todate = $aobj_context->mobj_data["todate"]; $query = "select dctran.FPHOTOPATH,concat(EXTRACT(YEAR from '{$fromdate}'),EXTRACT(MONTH from '{$fromdate}'), EXTRACT(DAY from '{$fromdate}'),'_',EXTRACT(YEAR from '{$todate}'),EXTRACT(MONTH from '{$todate}'),EXTRACT(DAY from '{$todate}')) as dateFormat from dctran where DATE_FORMAT(dctran.FREGDATE,'%Y-%m-%d') between '{$fromdate}' and '{$todate}' AND IFNULL(dctran.FPHOTOPATH,'') != '' and ifnull(fpaystatus,'') = 'success'"; $lobj_get_studentInfo = $aobj_context->mobj_db->getAll($query); $desDirectry = $aobj_context->main_src."/tmpphotos/".$lobj_get_studentInfo[0]['dateFormat']."/"; $photoDownloadCnt=0; //var_dump($lobj_get_studentInfo); foreach($lobj_get_studentInfo as $key=>$value) { $fURI =''; $photo_path = $value['FPHOTOPATH']; $file_name=replaceChars(basename($photo_path)); $fURI = 'cnv/'.$FUNIVCODE.'/'.$photo_path; if(!is_dir($desDirectry)) { mkdir($desDirectry); chmod($desDirectry,0777); } $full_file_path= $desDirectry.$file_name; //var_dump($full_file_path);die(); $target_file = $full_file_path;// Path to a local file //var_dump($target_file);die(); if (file_exists( $target_file )) { $ifmodhdr = 'If-Modified-Since: '.date( "r", filemtime( $target_file ) )."\r\n"; } else { $ifmodhdr = ''; } //$rc = copy( $fURI, $target_file); try { $rc = $s3->getObject(['Bucket' => STUDENT_PHOTOS_BUCKET, 'Key' => $fURI, 'SaveAs' => $target_file]); } catch(S3Exception $e) { $excepted = true; // Assert::assertEquals('NoSuchKey', $e->getAwsErrorCode()); } finally { // Assert::assertTrue($excepted); } // if($rc) // { // $photoDownloadCnt++; // if ( fclose( $rc ) ) // { // unset( $err ); // } // else // { // $err = error_get_last(); // } // } // else // { // $err = error_get_last(); // } } $the_folder = $desDirectry; $zip_file_name = "tmpphotos/kus_"."{$lobj_get_studentInfo[0]['dateFormat']}.zip"; //var_dump($zip_file_name); $download_file= true; // $command = "zip -r ".$zip_file_name." tmpphotos/".$lobj_get_studentInfo[0]['dateFormat']; // $res = exec($command); $za = new FlxZipArchive; $res = $za->open($zip_file_name, ZipArchive::CREATE); if($res === TRUE) { $za->addDir($the_folder, basename($the_folder)); $za->close(); } else { echo 'Could not create a zip archive'; } if($download_file) { ob_get_clean(); header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private", false); header("Content-Type: application/zip"); header("Content-Disposition: attachment; filename=" . basename($zip_file_name) . ";" ); header("Content-Transfer-Encoding: binary"); header("Content-Length: " . filesize($zip_file_name)); readfile($zip_file_name); } } function replaceChars($name) { $spl_char = array("*","/","~","!","@","#","$","%","^","&",":",";","?","/","\\","_","-","'"," ",""); $link_name = strtolower(str_replace($spl_char,"_",$name)); return str_ireplace("__","_",$link_name); } class FlxZipArchive extends ZipArchive { public function addDir($location, $name) { $this->addDirDo($location, $name); } private function addDirDo($location, $name) { $name .= '/'; $location .= '/'; $dir = opendir ($location); while ($file = readdir($dir)) { if ($file == '.' || $file == '..') continue; // Rekursiv, If dir: FlxZipArchive::addDir(), else ::File(); $do = (filetype( $location . $file) == 'dir') ? 'addDir' : 'addFile'; $this->$do($location . $file, $name . $file); } } } function downloadstudentphotos($aobj_context) { //echo "hello"; /*session_start(); $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); $fromdate = $aobj_context->mobj_data["fromdate"]; $todate = $aobj_context->mobj_data["todate"]; $query = "select dctran.FPHOTOPATH,concat(EXTRACT(YEAR from '{$fromdate}'),EXTRACT(MONTH from '{$fromdate}'),EXTRACT(DAY from '{$fromdate}'),'_',EXTRACT(YEAR from '{$todate}'),EXTRACT(MONTH from '{$todate}'),EXTRACT(DAY from '{$todate}')) as dateFormat from dctran where DATE_FORMAT(dctran.FREGDATE,'%Y-%m-%d') between '{$fromdate}' and '{$todate}' AND IFNULL(dctran.FPHOTOPATH,'') != ''"; $lobj_get_studentInfo = $aobj_context->mobj_db->getAll($query); var_dump($query); var_dump($lobj_get_studentInfo);die(); $desDirectry = $aobj_context->main_src."/tmpphotos/".$lobj_get_studentInfo[0]['dateFormat']."/"; $photoDownloadCnt=0; foreach($lobj_get_studentInfo as $key=>$value) { $fURI =''; $photo_path = $value['FPHOTOPATH']; $file_name=replaceChars(basename($photo_path)); if(!empty($photo_path) && file_exists($photo_path)) { $fURI = $photo_path; } if(!is_dir($desDirectry)) { mkdir($desDirectry); chmod($desDirectry,0777); } $full_file_path= $desDirectry.$file_name; //var_dump($full_file_path);die(); if (file_exists($fURI)) { $target_file = $full_file_path;// Path to a local file //var_dump($target_file);die(); if (file_exists( $target_file )) { $ifmodhdr = 'If-Modified-Since: '.date( "r", filemtime( $target_file ) )."\r\n"; } else { $ifmodhdr = ''; } $rc = copy( $fURI, $target_file); if($rc) { $photoDownloadCnt++; if ( fclose( $rc ) ) { unset( $err ); } else { $err = error_get_last(); } } else { $err = error_get_last(); } } } $the_folder = $desDirectry; $zip_file_name = "tmpphotos/kus_"."{$lobj_get_studentInfo[0]['dateFormat']}.zip"; $download_file= true; $za = new FlxZipArchive; $res = $za->open($zip_file_name, ZipArchive::CREATE); if($res === TRUE) { $za->addDir($the_folder, basename($the_folder)); $za->close(); } else { echo 'Could not create a zip archive'; } if($download_file) { ob_get_clean(); header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private", false); header("Content-Type: application/zip"); header("Content-Disposition: attachment; filename=" . basename($zip_file_name) . ";" ); header("Content-Transfer-Encoding: binary"); header("Content-Length: " . filesize($zip_file_name)); readfile($zip_file_name); } */ } ?>
Close