选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
3 ÄvhÄ7ã @süddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z ddl m Z mZddlZejjdƒr’ddljjjjZn ejejZyeZWnek r¾dZYnXeZddlm Z ddlm!Z!ddd d gZ"d-d d „Z#ej$d.d d„ƒZ%ej$dd„ƒZ&ej$dd„ƒZ'ej$dd„ƒZ(Gdd„de)ƒZ*Gdd„dƒZ+ej$dd„ƒZ,dd„Z-ej$dd„ƒZ.ej$dd „ƒZ/d!d"„Z0d#d$„Z1d%d „Z2Gd&d„dƒZ3e4ed'ƒ�r¸ej5gZ6ngZ6Gd(d„de3ƒZ7ej8ej9d)d*„d+j:ƒDƒƒZ;Gd,d „d e ƒZ)r;r2r3rrrÚresume†s zExceptionSaver.resumeN)r5r6r7r8r<r@rCrrrrr:rs r:c #sVtjjƒ‰tƒ� }ˆVWdQRXtjjˆƒ‡fdd„tjDƒ}t|ƒ|jƒdS)z  Context in which imported modules are saved. Translates exceptions internal to the context into the equivalent exception outside the context. Nc3s&|]}|ˆkr|jdƒ r|VqdS)z encodings.N)Ú startswith)Ú.0Úmod_name)rrrú Ÿszsave_modules..)rÚmodulesÚcopyr:ÚupdateÚ_clear_modulesrC)Ú saved_excZ del_modulesr)rrÚ save_modules�s  rMcCsxt|ƒD] }tj|=q WdS)N)ÚlistrrH)Z module_namesrFrrrrK©srKc cs$tjƒ}z |VWdtj|ƒXdS)N)r"Ú __getstate__Ú __setstate__)rrrrÚsave_pkg_resources_state®s rQc,cs–tjj|dƒ}tƒ�xtƒ�ftƒtƒ�Ntƒ�<t|ƒ�(t |ƒ�t dƒdVWdQRXWdQRXWdQRXWdQRXWdQRXWdQRXdS)NZtempZ setuptools) r&rÚjoinrQrMÚhide_setuptoolsr rr%r*Ú __import__)Ú setup_dirZtemp_dirrrrÚ setup_context·s  rVcCstjdƒ}t|j|ƒƒS)aH >>> _needs_hiding('setuptools') True >>> _needs_hiding('pkg_resources') True >>> _needs_hiding('setuptools_plugin') False >>> _needs_hiding('setuptools.__init__') True >>> _needs_hiding('distutils') True >>> _needs_hiding('os') False >>> _needs_hiding('Cython') True z1(setuptools|pkg_resources|distutils|Cython)(\.|$))ÚrerÚboolÚmatch)rFÚpatternrrrÚ _needs_hidingÆs r[cCstttjƒ}t|ƒdS)a% Remove references to setuptools' modules from sys.modules to allow the invocation to import the most appropriate setuptools. This technique is necessary to avoid issues such as #315 where setuptools upgrading itself would fail to find a function declared in the metadata. N)Úfilterr[rrHrK)rHrrrrSÛs rScCsêtjjtjj|ƒƒ}t|ƒ�Äyˆ|gt|ƒtjdd…<tjjd|ƒt j ƒt j j dd„ƒt |tƒrl|n |jtjƒƒ}t|ƒ�t|dd�}t||ƒWdQRXWn4tk rÚ}z|jrÊ|jdrÊ‚WYdd}~XnXWdQRXdS)z8Run a distutils setup script, sandboxed in its directoryNrcSs|jƒS)N)Zactivate)ZdistrrrÚïszrun_setup..Ú__main__)Ú__file__r5)r&rÚabspathÚdirnamerVrNrrÚinsertrÚ__init__Z callbacksÚappendÚ isinstanceÚstrÚencodeÚgetfilesystemencodingr ÚdictrÚ SystemExitÚargs)Z setup_scriptrkrUZ dunder_fileÚnsÚvrrrr æs   c@s2eZdZdZdZdd„Zdd„Zdd„Zd d „Zd d „Z d d„Z x$d9D]Z e e e ƒrFe e ƒeƒe <qFWd:dd„Zer~edeƒZedeƒZx$d;D]Z e e e ƒrŽee ƒeƒe <qŽWd)d*„Zx$drzDWrap 'os' module and 'open()' builtin for virtualizing setup scriptsFcs‡fdd„ttƒDƒˆ_dS)Ncs&g|]}|jdƒ rtˆ|ƒr|‘qS)Ú_)rDÚhasattr)rEÚname)r;rrú sz,AbstractSandbox.__init__..)ÚdirÚ_osÚ_attrs)r;r)r;rrcszAbstractSandbox.__init__cCs&x |jD]}tt|t||ƒƒqWdS)N)rtÚsetattrr&Úgetattr)r;ÚsourcerprrrÚ_copy s zAbstractSandbox._copycCs(|j|ƒtr|jt_|jt_d|_dS)NT)rxÚ_filerÚfileÚ_openrÚ_active)r;rrrr<s  zAbstractSandbox.__enter__cCs$d|_trtt_tt_|jtƒdS)NF)r|ryrrzr{rrxrs)r;Úexc_typeÚ exc_valueÚ tracebackrrrr@s zAbstractSandbox.__exit__c Cs|�|ƒSQRXdS)zRun 'func' under os sandboxingNr)r;ÚfuncrrrÚrunszAbstractSandbox.runcsttˆƒ‰‡‡fdd„}|S)Ncs2|jr |jˆ||f|ž|Ž\}}ˆ||f|ž|ŽS)N)r|Ú _remap_pair)r;ÚsrcÚdstrkÚkw)rpÚoriginalrrÚwrap&sz3AbstractSandbox._mk_dual_path_wrapper..wrap)rvrs)rpr‡r)rpr†rÚ_mk_dual_path_wrapper#s z%AbstractSandbox._mk_dual_path_wrapperÚrenameÚlinkÚsymlinkNcs ˆp ttˆƒ‰‡‡fdd„}|S)Ncs*|jr|jˆ|f|ž|Ž}ˆ|f|ž|ŽS)N)r|Ú _remap_input)r;rrkr…)rpr†rrr‡4sz5AbstractSandbox._mk_single_path_wrapper..wrap)rvrs)rpr†r‡r)rpr†rÚ_mk_single_path_wrapper1sz'AbstractSandbox._mk_single_path_wrapperrzrÚstatÚlistdirr(ÚchmodÚchownÚmkdirÚremoveÚunlinkÚrmdirÚutimeÚlchownÚchrootÚlstatÚ startfileÚmkfifoÚmknodÚpathconfÚaccesscsttˆƒ‰‡‡fdd„}|S)NcsB|jr2|jˆ|f|ž|Ž}|jˆˆ|f|ž|ŽƒSˆ|f|ž|ŽS)N)r|rŒÚ _remap_output)r;rrkr…)rpr†rrr‡Isz4AbstractSandbox._mk_single_with_return..wrap)rvrs)rpr‡r)rpr†rÚ_mk_single_with_returnFs z&AbstractSandbox._mk_single_with_returnÚreadlinkÚtempnamcsttˆƒ‰‡‡fdd„}|S)Ncs ˆ||Ž}|jr|jˆ|ƒS|S)N)r|rŸ)r;rkr…Zretval)rpr†rrr‡Xs  z'AbstractSandbox._mk_query..wrap)rvrs)rpr‡r)rpr†rÚ _mk_queryUs zAbstractSandbox._mk_queryr'ÚtmpnamcCs|S)z=Called to remap or validate any path, whether input or outputr)r;rrrrÚ_validate_pathdszAbstractSandbox._validate_pathcOs |j|ƒS)zCalled for path inputs)r¥)r;Ú operationrrkr…rrrrŒhszAbstractSandbox._remap_inputcCs |j|ƒS)zCalled for path outputs)r¥)r;r¦rrrrrŸlszAbstractSandbox._remap_outputcOs0|j|d|f|ž|Ž|j|d|f|ž|ŽfS)z?Called for path pairs like rename, link, and symlink operationsz-fromz-to)rŒ)r;r¦rƒr„rkr…rrrr‚pszAbstractSandbox._remap_pair)r‰rŠr‹)N)rŽr�r(rr�r‘r’r“r”r•r–r—r˜r™ršr›rœr�rž)r¡r¢)r'r¤)r5r6r7r8r|rcrxr<r@r�rˆrprorsrr�ryr{r r£r¥rŒrŸr‚rrrrrsB          Údevnullc@s˜eZdZdZejdddddddd d d d d dg ƒZdgZefdd„Z dd„Z e rXd'dd„Z d(dd„Z dd„Z dd„Zdd„Zdd „Zd!d"„Zd)d$d%„Zd&S)*r z.) r&rr©rªÚ_sandboxrRÚ_prefixÚ _exceptionsrrc)r;ZsandboxÚ exceptionsrrrrcŒs  zDirectorySandbox.__init__cOsddlm}||||ƒ‚dS)Nr)r )r/r )r;r¦rkr…r rrrÚ _violation•s zDirectorySandbox._violationÚrcOs<|dkr*|j|ƒ r*|jd||f|ž|Žt||f|ž|ŽS)Nr°Úrtr ÚrUÚUrz)r°r±r r²r³)Ú_okr¯ry)r;rrrkr…rrrry›szDirectorySandbox._filecOs<|dkr*|j|ƒ r*|jd||f|ž|Žt||f|ž|ŽS)Nr°r±r r²r³r)r°r±r r²r³)r´r¯r{)r;rrrkr…rrrr{ szDirectorySandbox._opencCs|jdƒdS)Nr¤)r¯)r;rrrr¤¥szDirectorySandbox.tmpnamc CsN|j}z:d|_tjjtjj|ƒƒ}|j|ƒp@||jkp@|j|jƒS||_XdS)NF) r|r&rr©rªÚ _exemptedr«rDr¬)r;rZactiverªrrrr´¨s   zDirectorySandbox._okcs<‡fdd„|jDƒ}‡fdd„|jDƒ}tj||ƒ}t|ƒS)Nc3s|]}ˆj|ƒVqdS)N)rD)rEZ exception)ÚfilepathrrrG·sz-DirectorySandbox._exempted..c3s|]}tj|ˆƒVqdS)N)rWrY)rErZ)r¶rrrG»s)r­Ú_exception_patternsÚ itertoolsÚchainÚany)r;r¶Z start_matchesZpattern_matchesZ candidatesr)r¶rrµµs      zDirectorySandbox._exemptedcOs6||jkr2|j|ƒ r2|j|tjj|ƒf|ž|Ž|S)zCalled for path inputs)Ú write_opsr´r¯r&rrª)r;r¦rrkr…rrrrŒÁszDirectorySandbox._remap_inputcOs6|j|ƒ s|j|ƒ r.|j|||f|ž|Ž||fS)z?Called for path pairs like rename, link, and symlink operations)r´r¯)r;r¦rƒr„rkr…rrrr‚ÇszDirectorySandbox._remap_pairéÿcOsB|t@r,|j|ƒ r,|jd|||f|ž|Žtj|||f|ž|ŽS)zCalled for low-level os.open()zos.open)Ú WRITE_FLAGSr´r¯rsr)r;rzÚflagsrrkr…rrrrÍszDirectorySandbox.openN)r°)r°)r¼)r5r6r7r8riÚfromkeysr»r·Ú _EXCEPTIONSrcr¯ryr{r¤r´rµrŒr‚rrrrrr ~s      cCsg|]}tt|dƒ‘qS)r)rvrs)rEÚarrrrqÕsrqz4O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARYc@s&eZdZdZejdƒjƒZdd„ZdS)r zEA setup script attempted to modify the filesystem outside the sandboxa SandboxViolation: {cmd}{args!r} {kwargs} The package setup script has attempted to modify files on your system that are not within the EasyInstall build area, and has been aborted. This package cannot be safely installed by EasyInstall, and may not support alternate installation locations even if you run its setup script by hand. Please inform the package's author and the EasyInstall maintainers to find out if a fix or workaround is available. cCs|j\}}}|jjftƒŽS)N)rkÚtmplÚformatr)r;ÚcmdrkÚkwargsrrrÚ__str__és zSandboxViolation.__str__N) r5r6r7r8ÚtextwrapÚdedentÚlstriprÂrÆrrrrr Ús )N)N)=r&rr$ÚoperatorÚ functoolsr¸rWÚ contextlibr,rÇZsetuptools.externrZsetuptools.extern.six.movesrrZpkg_resources.py31compatr"ÚplatformrDZ$org.python.modules.posix.PosixModuleÚpythonrHÚposixZ PosixModulersrprzryÚ NameErrorrr{Zdistutils.errorsrrÚ__all__rÚcontextmanagerrr r%r*r.r+r:rMrKrQrVr[rSr rror§rÀr ÚreduceÚor_Úsplitr½r rrrrÚs^             w  V