选择文件�文件大�最�修改时间�作
[📄] 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
a ´iZPã @sdZddlZddlZddlZddlZddlTddlmZgd¢eZ[ejej ej e e e fZedZdedfed fed ffZed Zd Zd d„ZdVdddœdd„ZdWddœdd„Zdddddddddddœ Zd d!„Zd"d#„Zd$d%„Zd&d'„Zddœd(d)„Ze  d*d+¡Z!d,e!j"_d-e!j_d.e!j#_d/e!j$_d0e!j%_d1e!j&_d2e!j'_d3e!j(_d4Z)d5Z*Gd6d7„d7e!ƒZ+dd8œd9d:„Z,d;d<„Z-d=d>„Z.dXd?d@„Z/dYddœdBdC„Z0dddœdDdE„Z1dZdddFœdGdH„Z2dIdJ„Z3e0Z4dKdL„Z5dMdN„Z6dOdP„Z7GdQdR„dRƒZ8dSdT„Z9e:dUk�re9ƒdS)[z0Disassembler of Python byte code into mnemonics.éN)Ú*)Ú__all__) Ú code_infoÚdisÚ disassembleÚdistbÚdiscoÚfindlinestartsÚ findlabelsÚ show_codeÚget_instructionsÚ InstructionÚBytecodeÚ FORMAT_VALUE)NÚÚstrÚreprÚasciiÚ MAKE_FUNCTION)ÚdefaultsÚ kwdefaultsÚ annotationsZclosurecCs4zt||dƒ}Wnty.t||dƒ}Yn0|S)zßAttempts to compile the given source, first as an expression and then as a statement if the first approach fails. Utility function to accept strings in functions that otherwise expect code objects ÚevalÚexec)ÚcompileÚ SyntaxError)ÚsourceÚnameÚc©rú/usr/lib64/python3.9/dis.pyÚ _try_compiles  r!©ÚfileÚdepthc Csj|durt|d�dSt|dƒr&|j}t|dƒr8|j}n4t|dƒrJ|j}n"t|dƒr\|j}nt|dƒrl|j}t|dƒrþt|j  ¡ƒ}|D]r\}}t |t ƒrˆt d ||d�zt |||d �Wn2tyî}zt d ||d�WYd}~n d}~00t |d�qˆnht|d ƒ�rt|||d �nLt |ttfƒ�r8t||d�n.t |tƒ�rTt|||d �ntd t|ƒjƒ‚dS)a0Disassemble classes, methods, functions, and other compiled objects. With no argument, disassemble the last traceback. Compiled objects currently include generator objects, async generator objects, and coroutine objects, all of which store their code object in a special attribute. N©r#Ú__func__Ú__code__Úgi_codeÚag_codeÚcr_codeÚ__dict__zDisassembly of %s:r"zSorry:Úco_codeú(don't know how to disassemble %s objects)rÚhasattrr&r'r(r)r*Úsortedr+ÚitemsÚ isinstanceÚ _have_codeÚprintrÚ TypeErrorÚ_disassemble_recursiveÚbytesÚ bytearrayÚ_disassemble_bytesrÚ_disassemble_strÚtypeÚ__name__)Úxr#r$r0rZx1Úmsgrrr r+s@          $  ÿrr%cCsV|dur>z tj}Wnty.tdƒd‚Yn0|jr>|j}q0t|jj|j|d�dS)z2Disassemble a traceback (default: last traceback).Nz no last traceback to disassembler%) ÚsysÚlast_tracebackÚAttributeErrorÚ RuntimeErrorÚtb_nextrÚtb_frameÚf_codeÚtb_lasti)Útbr#rrr rXs  rZ OPTIMIZEDZ NEWLOCALSZVARARGSZ VARKEYWORDSZNESTEDZ GENERATORZNOFREEZ COROUTINEZITERABLE_COROUTINEZASYNC_GENERATOR) éééééé é@é€éicCs`g}tdƒD]:}d|>}||@r | t |t|ƒ¡¡||N}|s qVq | t|ƒ¡d |¡S)z+Return pretty representation of code flags.rLrGú, )ÚrangeÚappendÚCOMPILER_FLAG_NAMESÚgetÚhexÚjoin)ÚflagsÚnamesÚiÚflagrrr Ú pretty_flagsrs r[cCsŽt|dƒr|j}t|dƒr"|j}n4t|dƒr4|j}n"t|dƒrF|j}nt|dƒrV|j}t|tƒrjt|dƒ}t|dƒrx|St dt |ƒj ƒ‚d S) zDHelper to handle methods, compiled or raw code objects, and strings.r&r'r(r)r*z r,r-N) r.r&r'r(r)r*r1rr!r4r:r;©r<rrr Ú_get_code_object€s"        ÿr]cCs tt|ƒƒS)z1Formatted details of methods, functions, or code.)Ú_format_code_infor]r\rrr r—srcCs„g}| d|j¡| d|j¡| d|j¡| d|j¡| d|j¡| d|j¡| d|j¡| dt|j ƒ¡|j r¶| d ¡t |j ƒD]}| d |¡q¢|j rä| d ¡t |j ƒD]}| d |¡qÐ|j �r| d ¡t |j ƒD]}| d |¡�q|j�rH| d¡t |jƒD]}| d |¡�q2|j�rz| d¡t |jƒD]}| d |¡�qdd |¡S)NzName: %szFilename: %szArgument count: %szPositional-only arguments: %szKw-only arguments: %szNumber of locals: %szStack size: %szFlags: %sz Constants:z%4d: %rzNames:z%4d: %szVariable names:zFree variables:zCell variables:Ú )rRÚco_nameÚ co_filenameÚ co_argcountÚco_posonlyargcountÚco_kwonlyargcountÚ co_nlocalsÚ co_stacksizer[Úco_flagsÚ co_constsÚ enumerateÚco_namesÚ co_varnamesÚ co_freevarsÚ co_cellvarsrV)ÚcoÚlinesZi_cZi_nrrr r^›s<     r^cCstt|ƒ|d�dS)z}Print details of methods, functions, or code to *file*. If *file* is not provided, the output is printed on stdout. r%N)r3r)rnr#rrr r »sr Ú _InstructionzBopname opcode arg argval argrepr offset starts_line is_jump_targetz!Human readable name for operationzNumeric code for operationz6Numeric argument to operation (if any), otherwise Nonez4Resolved arg value (if known), otherwise same as argz0Human readable description of operation argumentz1Start index of operation within bytecode sequencez4Line started by this opcode (if any), otherwise Nonez1True if other code jumps to here, otherwise Falseééc@seZdZdZddd„ZdS) r aKDetails for a bytecode operation Defined fields: opname - human readable name for operation opcode - numeric code for operation arg - numeric argument to operation (if any), otherwise None argval - resolved arg value (if known), otherwise same as arg argrepr - human readable description of operation argument offset - start index of operation within bytecode sequence starts_line - line started by this opcode (if any), otherwise None is_jump_target - True if other code jumps to here, otherwise False éFrIcCsàg}|r:|jdur,d|}| ||j¡n| d|¡|rJ| d¡n | d¡|jrf| d¡n | d¡| t|jƒ |¡¡| |j t¡¡|j durÒ| t|j ƒ t ¡¡|j rÒ| d|j d ¡d  |¡  ¡S) a%Format instruction details for inclusion in disassembly output *lineno_width* sets the width of the line number field (0 omits it) *mark_as_current* inserts a '-->' marker arrow as part of the line *offset_width* sets the width of the instruction offset field Nz%%%ddú z-->z z>>z ú(ú))Ú starts_linerRÚis_jump_targetrÚoffsetÚrjustÚopnameÚljustÚ _OPNAME_WIDTHÚargÚ _OPARG_WIDTHÚargreprrVÚrstrip)ÚselfÚ lineno_widthZmark_as_currentÚ offset_widthÚfieldsZ lineno_fmtrrr Ú _disassembleßs&      zInstruction._disassembleN)rsFrI)r;Ú __module__Ú __qualname__Ú__doc__r†rrrr r Ñs r )Ú first_linecCsTt|ƒ}|j|j}tt|ƒƒ}|dur4||j}nd}t|j|j|j |j |||ƒS)a«Iterator for the opcodes in methods, functions or code Generates a series of Instruction named tuples giving the details of each operations in the supplied code. If *first_line* is not None, it indicates the line number that should be reported for the first source line in the disassembled code. Otherwise, the source line information (if any) is taken directly from the disassembled code object. Nr) r]rmrlÚdictr Úco_firstlinenoÚ_get_instructions_bytesr,rkrjrh)r<rŠrnÚ cell_namesÚ linestartsÚ line_offsetrrr r s    þr cCs |}|dur||}|t|ƒfS)zÕHelper to get optional details about const references Returns the dereferenced constant and its repr if the constant list is defined. Otherwise returns the constant index and its repr(). N©r)Z const_indexZ const_listÚargvalrrr Ú_get_const_infosr“cCs*|}|dur||}|}nt|ƒ}||fS)zÓHelper to get optional details about named references Returns the dereferenced name as both value and repr if the name list is defined. Otherwise returns the name index and its repr(). Nr‘)Z name_indexZ name_listr’r€rrr Ú_get_name_info's r”c #sŽt|ƒ}d}t|ƒD�]r\} } ‰|durD| | d¡}|durD||7}| |v} d} d} ˆdu�rlˆ} | tvrztˆ|ƒ\} } nò| tvr’tˆ|ƒ\} } nÚ| tvr´| dˆ} dt| ƒ} n¸| t vrÌtˆ|ƒ\} } n | t vrât ˆ} | } nŠ| t vrútˆ|ƒ\} } nr| t k�rFtˆd@\} } | tˆd@ƒf} | d�rl| �r<| d7} | d 7} n&| tk�rld ‡fd d „ttƒDƒ¡} tt| | ˆ| | | || ƒVqdS) a&Iterate over the instructions in a bytecode string. Generates a sequence of Instruction namedtuples giving the details of each opcode. Additional information about the code's runtime environment (e.g. variable names, constants) can be specified using optional arguments. NrrHzto rsrIrGrPz with formatc3s"|]\}}ˆd|>@r|VqdS)rGNr)Ú.0rYÚs©r~rr Ú gs  ÿz*_get_instructions_bytes..)r Ú_unpack_opargsrTZhasconstr“Zhasnamer”ÚhasjrelrZhaslocalZ hascompareZcmp_opZhasfreerÚFORMAT_VALUE_CONVERTERSÚboolrrVriÚMAKE_FUNCTION_FLAGSr r{)ÚcodeÚvarnamesrXÚ constantsÚcellsr�r�ÚlabelsrwryÚoprxr’r€rr—r r�7sN         þr�éÿÿÿÿc Cs<|j|j}tt|ƒƒ}t|j||j|j|j|||d�dS)zDisassemble a code object.r%N) rmrlr‹r r8r,rkrjrh)rnÚlastir#rŽr�rrr rms    ÿrcCspt||d�|dus|dkrl|dur,|d}|jD]8}t|dƒr2t|d�td|f|d�t|||d�q2dS)Nr%rrGr,zDisassembly of %r:r")rrhr.r3r5)rnr#r$r<rrr r5ts    r5)r#r�c CsÈ|du} | r8t| ¡ƒ|} | dkr2tt| ƒƒ} qN)r5r!)rÚkwargsrrr r9�sr9ccsdd}tdt|ƒdƒD]J}||}|tkrN||d|B}|tkrH|d>nd}nd}|||fVqdS)NrrHrGrJ)rQr©Z HAVE_ARGUMENTZ EXTENDED_ARG)ržZ extended_argrYr£r~rrr r™£sr™cCs\g}t|ƒD]J\}}}|dur |tvr4|d|}n|tvr |}nq ||vr | |¡q |S)z`Detect all offsets in a byte code which are jump targets. Return the list of offsets. NrH)r™ršZhasjabsrR)ržr¢ryr£r~Zlabelrrr r ®s r c csª|jddd…}|jddd…}t|jƒ}d}|j}d}t||ƒD]P\}}|rz||krd||fV|}||7}||krzdS|dkrŠ|d8}||7}qB||kr¦||fVdS)z”Find the offsets in a byte code which are start of lines in the source. Generate pairs (offset, lineno) as described in Python/compile.c. rNrHrGrNrO)Ú co_lnotabr©r,rŒÚzip) ržZbyte_incrementsZline_incrementsZ bytecode_lenZ lastlinenoÚlinenoÚaddrZ byte_incrZ line_incrrrr r Ás&   r c@sLeZdZdZdddœdd„Zdd„Zdd „Zed d „ƒZd d „Z dd„Z dS)raThe bytecode operations of a piece of code Instantiate this with a function, method, other compiled object, string of code, or a code object (as returned by compile()). Iterating over this yields the bytecode operations as Instruction instances. N)rŠÚcurrent_offsetcCsdt|ƒ|_}|dur&|j|_d|_n||_||j|_|j|j|_tt |ƒƒ|_ ||_ ||_ dS)Nr) r]ÚcodeobjrŒrŠÚ _line_offsetrmrlÚ _cell_namesr‹r Ú _linestartsÚ_original_objectr¯)r‚r<rŠr¯rnrrr Ú__init__çs zBytecode.__init__c Cs*|j}t|j|j|j|j|j|j|jd�S)Nr¦) r°r�r,rkrjrhr²r³r±)r‚rnrrr Ú__iter__ôs ýzBytecode.__iter__cCsd |jj|j¡S)Nz{}({!r}))ÚformatÚ __class__r;r´©r‚rrr Ú__repr__ûs ÿzBytecode.__repr__cCs |jr|j}q||jj|jd�S)z/ Construct a Bytecode from the given traceback )r¯)rBrCrDrE)ÚclsrFrrr Úfrom_tracebackÿszBytecode.from_tracebackcCs t|jƒS)z3Return formatted information about the code object.)r^r°r¹rrr Úinfosz Bytecode.infoc Csx|j}|jdur|j}nd}t ¡�@}t|j|j|j|j|j |j |j ||d� |  ¡WdƒS1sj0YdS)z3Return a formatted view of the bytecode operations.Nr¤)rŸrXr r¡r�r�r#r¥) r°r¯ÚioÚStringIOr8r,rkrjrhr²r³r±Úgetvalue)r‚rnryÚoutputrrr r s   úz Bytecode.dis) r;r‡rˆr‰rµr¶rºÚ classmethodr¼r½rrrrr rßs  rcCszddl}| ¡}|jd| d¡ddd�| ¡}|j�}| ¡}Wdƒn1sT0Yt||jjdƒ}t |ƒdS) z*Simple test program to disassemble a file.rNÚinfileÚrbú?ú-)r:ÚnargsÚdefaultr) ÚargparseÚArgumentParserÚ add_argumentÚFileTypeÚ parse_argsrÃÚreadrrr)rÉÚparserÚargsrÃrržrrr Ú_tests&rÑÚ__main__)N)N)NNNNNr)r¤)r¤NNNNN);r‰r>ÚtypesÚ collectionsr¾ZopcoderZ _opcodes_allÚ MethodTypeÚ FunctionTypeÚCodeTyperÂÚ staticmethodr:r2Zopmaprrrrr›rr�r!rrrSr[r]rr^r Ú namedtuplerpr{r~r’r€ryrwrxr}rr r r“r”r�rr5r8r9rr™r r rrÑr;rrrr Ús˜ þ ÿü -ö  ÿ4 ÿ 6 ÿþ  =