Example #1
0
 private function readLicence($licencekey)
 {
     $c = "";
     if (strpos($licencekey, "|") == false) {
         return false;
     }
     list($pre, $c) = explode("|", $licencekey);
     if (empty($c)) {
         return false;
     }
     $modulus = "247951816413205085921106286398120136896788014055199338629780778472204077308053767006218018324142651909195596003106594609159002643031774387211432583166542583483099049359378164797170552666392349957500492002826361302903529659499530039.0000000000";
     $public = "65537";
     $keylength = "768";
     Ibos::import("ext.auth.RSA", true);
     $RSA = new RSA();
     $pre = base64_decode($pre);
     $key = $RSA->verify($pre, $public, $modulus, $keylength);
     $key = trim($key, "");
     Ibos::import("ext.auth.AES", true);
     $AES = new AES(true);
     $keys = $AES->makeKey($key);
     $s = $AES->decryptString($c, $keys);
     $s = json_decode($s, true);
     return $s;
 }
Example #2
0
$fileDir = str_replace($sroot, '', $fileDir);
//echo "$sroot<br /> " . __FILE__  . "<br/> ". $fileDir;
if ($fileDir == '/home/qiushaowei/htdocs/uxcjs/tools/php') {
    $fileDir = '/~qiushaowei/uxcjs/tools/php';
}
if ($fileDir == '/home/qiushaowei/htdocs/jcjs/tools/php') {
    $fileDir = '/~qiushaowei/jcjs/tools/php';
}
$base_path = './';
$key = 'imququin360';
$aes = new AES(true);
$keys = $aes->makeKey($key);
$blacklist_folder = array('.', '..', '.svn', '.git');
$whitelist_fileext = array('html', 'htm', 'js', 'css', 'jpg', 'jpeg', 'gif', 'png', 'bmp', 'ppt', 'pptx', 'doc', 'php', 'docx');
$path = empty($_GET['p']) ? '' : trim($_GET['p']);
$path = $aes->decryptString(trim($path), $keys);
$path = urlDecode($path);
$path_arr = explode('/', trim($path, '/'));
$list = scandir($base_path . $path);
if ($list === false) {
    die('not exist!');
}
$dir_list = array();
$file_list = array();
foreach ($list as $item) {
    $new_path = $path . $item;
    if (is_dir($base_path . $new_path)) {
        array_push($dir_list, $item);
    } else {
        array_push($file_list, $item);
    }