ef 8HddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z ddl mZejdrddlmcmcmcmZnejejZ eZn #e$rdZYnwxYweZgdZd dZejd dZ ejdZ!ejd Z"ejd Z#Gd d e$Z%Gd dZ&ejdZ'dZ(ejdZ)ejdZ*hdZ+dZ,dZ-dZ.GddZ/e0edr ej1gZ2ngZ2Gdde/Z3ej4ej5dd6DZ7Gdde Z8dS)!N)DistutilsError) working_setjava)AbstractSandboxDirectorySandboxSandboxViolation run_setupcd}t||5}|}dddn #1swxYwY||}t||d}t|||dS)z. Python 3 implementation of execfile. rbNexec)openreadcompiler )filenameglobalslocalsmodestreamscriptcodes r/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/sandbox.py _execfiler$s D h   ~ 68V , ,Dws 488c#Ktjdd}||tjdd< |V|tjdd<dS#|tjdd<wxYwN)sysargv)replsaveds r save_argvr1sf HQQQKE    e s AAc#Ktjdd} |V|tjdd<dS#|tjdd<wxYwr)rpathrs r save_pathr#<sQ HQQQKE  e s /Ac#Ktj|dtj}|t_ dV|t_dS#|t_wxYw)zL Monkey-patch tempfile.tempdir with replacement, ensuring it exists T)exist_okN)osmakedirstempfiletempdir) replacementrs r override_tempr+Es] K d++++  E"H!  5    s AAc#Ktj}tj| |Vtj|dS#tj|wxYwr)r&getcwdchdir)targetrs rpushdr0VsR IKKEHV  s AAc(eZdZdZedZdS)UnpickleableExceptionzP An exception representing another Exception that could not be pickled. c  tj|tj|fS#t$r5ddlm}|||t |cYSwxYw)z Always return a dumped (pickled) type and exc. If exc can't be pickled, wrap it in UnpickleableException first. r)r2)pickledumps Exceptionsetuptools.sandboxr2dumprepr)typeexcclss rr8zUnpickleableException.dumpes{  1<%%v|C'8'88 8 1 1 1 G G G G G G88CT#YY00 0 0 0  1s'*r?r@rIrOrUrBrCrrErEtsK    +++++rCrEc#PKtjt5}Vdddn #1swxYwYtjfdtjD}t ||dS)z Context in which imported modules are saved. Translates exceptions internal to the context into the equivalent exception outside the context. Nc3NK|]}|v|d|V dS)z encodings.N startswith).0mod_namers r zsave_modules..sP  5 ##L11 !  rC)rmodulescopyrEupdate_clear_modulesrU) saved_exc del_modulesrs @r save_modulesrcs K    E   Y Ku K; sAAAcDt|D]}tj|=dSr)listrr]) module_namesr[s rr`r`s0&&"" K ! !""rCc#Ktj} |Vtj|dS#tj|wxYwr) pkg_resources __getstate__ __setstate__r"s rsave_pkg_resources_staterksP  & ( (E* "5))))) "5))))s 1Ac #ZKtj|d}t5t 5t 5t t5t|5t|5tddVdddn #1swxYwYdddn #1swxYwYdddn #1swxYwYdddn #1swxYwYdddn #1swxYwYddddS#1swxYwYdS)Ntemp setuptools) r&r!joinrkrcr#hide_setuptoolsrr+r0 __import__) setup_dirtemp_dirs r setup_contextrtsw||Iv..H ! # # " " ^^ " " " "!!![[""&x00"""9--""&|444!EEE""""""""""""""""""""""""""""""""""""""""""""" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "sD DC1,C <C B, C ,B00C 3B04C 7 C CC C C  C1C C1!C "C1% D1C5 5D8C5 9D< D D D D D  D$'D$>Cython distutilsrnrh_distutils_hackcL|ddd}|tvS)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 .r)split_MODULES_TO_HIDE)r[ base_modules r _needs_hidingr~s("..a((+K * **rCctjdd}||t t tj}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. rwN)rr]get _remove_shimfilterr~r`)rwr]s rrprpsWkoo&7>>O"$$&&&]CK00G7rCctjtj|}t |5 |gt |zt jdd<t jd|tj tj dt|5t|d}t||dddn #1swxYwYn,#t $r}|jr|jdrYd}~nd}~wwxYwddddS#1swxYwYdS)z8Run a distutils setup script, sandboxed in its directoryNrc*|Sr)activate)dists rzrun_setup..sdmmoorC__main__)__file__r=)r&r!abspathdirnamertrerrinsertr__init__ callbacksappendrdictr SystemExitargs) setup_scriptrrrnsvs rr r s = =>>I y ! !   '.4::5CHQQQK HOOAy ) ) )  " " "  ! ( ()E)E F F F!),, , ,<*EEE,+++ , , , , , , , , , , , , , , ,   v !&)                    sa EBD "D4 D D D D D  E D5D0+E0D55EE  E ceZdZdZdZdZdZdZdZdZ dZ d D]$Z e e e re e ee <%dd Zer ed eZed eZdD]$Z e e e ree ee <%dZdD]$Z e e e ree ee <%dZdD]$Z e e e ree ee <%dZdZdZdZd S)rzDWrap 'os' module and 'open()' builtin for virtualizing setup scriptsFcRfdttD_dS)Nc^g|])}|dt|'|*S)_)rYhasattr)rZnamerHs r z,AbstractSandbox.__init__..sO   ??3'' -4D$,?,?    rC)dir_os_attrsrGs`rrzAbstractSandbox.__init__s7    C    rCc b|jD]&}tt|t||'dSr)rsetattrr&getattr)rHsourcers r_copyzAbstractSandbox._copys<K 5 5D Bgfd33 4 4 4 4 5 5rCc||tr|jt_|jt_d|_dSrK)r_filebuiltinsfile_openr _activerGs rrIzAbstractSandbox.__enter__s9 4  ' JHM   rCcd|_trtt_tt_|tdSNF)rrrrrr rr)rHexc_type exc_value tracebacks rrOzAbstractSandbox.__exit__!s2  "!HM  3rCcN|5|cdddS#1swxYwYdS)zRun 'func' under os sandboxingNrB)rHfuncs rrunzAbstractSandbox.run(su   466                  s c@ttfd}|S)NcX|jr|j||g|Ri|\}}||g|Ri|Sr)r _remap_pair)rHsrcdstrkwroriginals rwrapz3AbstractSandbox._mk_dual_path_wrapper..wrap0sZ| I+4+D#sHTHHHRHHS8C2t222r22 2rCrrrrrs` @r_mk_dual_path_wrapperz%AbstractSandbox._mk_dual_path_wrapper-s83%% 3 3 3 3 3 3  rC)renamelinksymlinkNcDpttfd}|S)NcN|jr|j|g|Ri|}|g|Ri|Sr)r _remap_inputrHr!rrrrs rrz5AbstractSandbox._mk_single_path_wrapper..wrap>sR| B(t(tAdAAAbAA8D.4...2.. .rCr)rrrs`` r_mk_single_path_wrapperz'AbstractSandbox._mk_single_path_wrapper;s=1wsD11 / / / / / /  rCrr )statlistdirr.r chmodchownmkdirremoveunlinkrmdirutimelchownchrootlstat startfilemkfifomknodpathconfaccessc@ttfd}|S)Nc|jr2|j|g|Ri|}||g|Ri|S|g|Ri|Sr)rr _remap_outputrs rrz4AbstractSandbox._mk_single_with_return..wrapcs| M(t(tAdAAAbAA))$0K0K0K0K0K0KLLL8D.4...2.. .rCrrs` @r_mk_single_with_returnz&AbstractSandbox._mk_single_with_return`s83%% / / / / / /  rC)readlinktempnamc@ttfd}|S)NcR|i|}|jr||S|Sr)rr)rHrrretvalrrs rrz'AbstractSandbox._mk_query..wraprs<Xt*r**F| 8))$777MrCrrs` @r _mk_queryzAbstractSandbox._mk_queryos83%%        rC)r-tmpnamc|S)z=Called to remap or validate any path, whether input or outputrB)rHr!s r_validate_pathzAbstractSandbox._validate_path~s rCc,||SzCalled for path inputsrrH operationr!rrs rrzAbstractSandbox._remap_input""4(((rCc,||S)zCalled for path outputsr)rHrr!s rrzAbstractSandbox._remap_outputrrCcV|j|dz|g|Ri||j|dz|g|Ri|fS)?Called for path pairs like rename, link, and symlink operationsz-fromz-to)rrHrrrrrs rrzAbstractSandbox._remap_pairs\ D i'13 D D D D D D D i%/ Bt B B Br B B  rCr)r=r>r?r@rrrrIrOrrrrrrrrrrrrrrrrBrCrrr sNNG   555 .99 73   922488FFHHTN 7''66 # #FE 2 2E;;* 73   ;44T::FFHHTN   (:: 73   :33D99FFHHTN   %-- 73   -&Yt__FFHHTN))))))     rCrdevnullceZdZdZegdZgZ efdZ dZ e rddZ ddZ dZ d Zd Zd Zd ZddZdS)rz}tjtj|?SrB)r&r!normcaserealpath)rZr!s rrz-DirectorySandbox.__init__..sE   9=BG  RW--d33 4 4   rC) r&r!rr_sandboxro_prefix _exceptionsrr)rHsandbox exceptionss rrzDirectorySandbox.__init__s(()9)9')B)BCC w||DM266   AK      &&&&&rCc(ddlm}||||)Nr)r)r7r)rHrrrrs r _violationzDirectorySandbox._violations)777777y$333rCrc||dvr(||s|jd||g|Ri|t||g|Ri|S)Nrrtr rUUr)_okrrrHr!rrrs rrzDirectorySandbox._filesc7777d@T@@@R@@@t1d111b11 1rCc||dvr(||s|jd||g|Ri|t||g|Ri|S)Nrr )rrrrs rrzDirectorySandbox._opensc 3 3 3DHHTNN 3 DOFD$ < < < < < < <T4-$---"---rCc0|ddS)Nr)rrGs rrzDirectorySandbox.tmpnams !!!!!rCc4|j} d|_tjtj|}||p$||jkp||j ||_S#||_wxYwr) rr&r!rr _exemptedrrYr)rHr!activers rrzDirectorySandbox._oks " DLw''(8(8(>(>??Hx((5t},5&&t|44  "DLL6DL ! ! ! !s A.sB  /8H   * *      rCc3BK|]}tj|VdSr)rematch)rZpatternr s rr\z-DirectorySandbox._exempted..s@  ,3BHWh ' '      rC)r_exception_patterns itertoolschainany)rHr  start_matchespattern_matches candidatess ` rrzDirectorySandbox._exemptedsx    <@r?r@textwrapdedentlstripr%r)rBrCrrrsOOO 8?    fhh ,,,,,rCrr)9r&rr(operator functoolsrr contextlibr4r*rrhdistutils.errorsrrplatformrY$org.python.modules.posix.PosixModulepythonr]posix PosixModulerrrr NameErrorr r__all__rcontextmanagerrr#r+r0r6r2rErcr`rkrtr|r~rpr rrrr rreduceor_r{rrrBrCrr;s   ++++++%%%%%%<6""6666666666666666 +bg C EE EEE             ! ! !  11111I111(++++++++< 2"""  ***  " " "+++*   (E E E E E E E E P 72y:,KKK[8[8[8[8[8[8[8[8|i LGMMOO ,,,,,~,,,,,s:A==BB