Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
3 \ÔFã @sàdZddlZddlZddlZddlZddlTddlmZddddd d d d d ddg eZ[ejej ej e e e fZedZdd„ZdKddœdd„ZdLddœdd„Zddddddddddd œ Zd!d"„Zd#d$„Zd%d„Zd&d'„Zddœd(d „Zejd)d*ƒZd+ej_d,ej_d-ej_d.ej_d/ej_d0ej _d1ej!_d2ej"_Gd3d„deƒZ#dd4œd5d „Z$d6d7„Z%d8d9„Z&dMd:d;„Z'dOddœd=d„Z(dQddd>œd?d@„Z)ddœdAdB„Z*e(Z+dCdD„Z,dEd „Z-dFd „Z.GdGd„dƒZ/dHdI„Z0e1dJk�rÜe0ƒdS)Rz0Disassembler of Python byte code into mnemonics.éN)Ú*)Ú__all__Ú code_infoÚdisÚ disassembleÚdistbÚdiscoÚfindlinestartsÚ findlabelsÚ show_codeÚget_instructionsÚ InstructionÚBytecodeÚ FORMAT_VALUEc Cs6yt||dƒ}Wn tk r0t||dƒ}YnX|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.6/dis.pyÚ _try_compiles r)ÚfilecCs>|dkrt|d�dSt|dƒr&|j}t|dƒr6|j}t|dƒrF|j}t|dƒrØt|jjƒƒ}xÚ|D]n\}}t|t ƒrdt d||d�yt ||d�Wn0t k rÆ}zt d||d�WYdd}~XnXt |d�qdWnbt|d ƒrðt ||d�nJt|ttfƒ�rt||d�n,t|tƒ�r(t||d�nt d t|ƒjƒ‚dS) zzDisassemble classes, methods, functions, generators, or code. With no argument, disassemble the last traceback. N)rÚ__func__Ú__code__Úgi_codeÚ__dict__zDisassembly of %s:zSorry:Úco_codez(don't know how to disassemble %s objects)rÚhasattrrrrÚsortedrÚitemsÚ isinstanceÚ _have_codeÚprintrÚ TypeErrorrÚbytesÚ bytearrayÚ_disassemble_bytesÚstrÚ_disassemble_strÚtypeÚ__name__)Úxrr"rZx1Úmsgrrrr"s6         c CsZ|dkrBy tj}Wntk r.tdƒ‚YnXx|jr@|j}q2Wt|jj|j|d�dS)z2Disassemble a traceback (default: last traceback).Nz no last traceback to disassemble)r) ÚsysÚlast_tracebackÚAttributeErrorÚ RuntimeErrorÚtb_nextrÚtb_frameÚf_codeÚtb_lasti)ÚtbrrrrrEs  Z OPTIMIZEDZ NEWLOCALSZVARARGSZ VARKEYWORDSZNESTEDZ GENERATORZNOFREEZ COROUTINEZITERABLE_COROUTINEZASYNC_GENERATOR) éééééé é@é€éicCsbg}xRtdƒD]8}d|>}||@r|jtj|t|ƒƒƒ||N}|sPqW|jt|ƒƒdj|ƒS)z+Return pretty representation of code flags.r>r9z, )ÚrangeÚappendÚCOMPILER_FLAG_NAMESÚgetÚhexÚjoin)ÚflagsÚnamesÚiÚflagrrrÚ pretty_flags_srLcCsht|dƒr|j}t|dƒr |j}t|dƒr0|j}t|tƒrDt|dƒ}t|dƒrR|Stdt|ƒj ƒ‚dS)zMHelper to handle methods, functions, generators, strings and raw code objectsrrrz rz(don't know how to disassemble %s objectsN) r rrrr#r*rr&r,r-)r.rrrÚ_get_code_objectms      rMcCs tt|ƒƒS)z1Formatted details of methods, functions, or code.)Ú_format_code_inforM)r.rrrr|scCs†g}|jd|jƒ|jd|jƒ|jd|jƒ|jd|jƒ|jd|jƒ|jd|jƒ|jdt|jƒƒ|j rª|jdƒx t |j ƒD]}|jd |ƒq”W|j rÜ|jd ƒx t |j ƒD]}|jd |ƒqÆW|j �r|jd ƒx t |j ƒD]}|jd |ƒqúW|j �rF|jd ƒx"t |j ƒD]}|jd |ƒ�q.W|j�r||jdƒx"t |jƒD]}|jd |ƒ�qdWdj|ƒS)NzName: %szFilename: %szArgument count: %szKw-only arguments: %szNumber of locals: %szStack size: %szFlags: %sz Constants:z%4d: %rzNames:z%4d: %szVariable names:zFree variables:zCell variables:Ú )rCÚco_nameÚ co_filenameÚ co_argcountÚco_kwonlyargcountÚ co_nlocalsÚ co_stacksizerLÚco_flagsÚ co_constsÚ enumerateÚco_namesÚ co_varnamesÚ co_freevarsÚ co_cellvarsrG)ÚcoÚlinesZi_cZi_nrrrrN€s:     rNcCstt|ƒ|d�dS)z}Print details of methods, functions, or code to *file*. If *file* is not provided, the output is printed on stdout. )rN)r%r)r]rrrrr ŸsÚ _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 Falsec@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 éFcCsàg}|r:|jdk r,d|}|j||jƒn|jd|ƒ|rJ|jdƒn |jdƒ|jrf|jdƒn |jdƒ|jt|jƒjdƒƒ|j|jjd ƒƒ|jdk rÒ|jt|jƒjd ƒƒ|j rÒ|jd |j d ƒdj |ƒj ƒS) zß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 Nz%%%ddú z-->z z>>z r;ééú(ú)) Ú starts_linerCÚis_jump_targetÚreprÚoffsetÚrjustÚopnameÚljustÚargÚargreprrGÚrstrip)ÚselfÚ lineno_widthZmark_as_currentZfieldsZ lineno_fmtrrrÚ _disassembleÀs&      zInstruction._disassembleN)r`F)r-Ú __module__Ú __qualname__Ú__doc__rrrrrrr ²s )Ú first_linecCsTt|ƒ}|j|j}tt|ƒƒ}|dk r4||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) rMr\r[Údictr Úco_firstlinenoÚ_get_instructions_bytesrrZrYrW)r.rvr]Ú cell_namesÚ linestartsÚ line_offsetrrrr ås    cCs |}|dk r||}|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)rh)Z const_indexZ const_listÚargvalrrrÚ_get_const_infoûsr~cCs*|}|dk r||}|}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(). N)rh)Z name_indexZ name_listr}rnrrrÚ_get_name_infos rc csxt|ƒ}d}�xdt|ƒD�]V\} } } |dk rH|j| dƒ}|dk rH||7}| |k} d} d}| dk �rT| } | tkr~t| |ƒ\} }nÖ| tkr–t| |ƒ\} }n¾| tkr¸| d| } dt| ƒ}nœ| t krÐt| |ƒ\} }n„| t kræt | } | }nn| t krþt| |ƒ\} }nV| t k�rTdtttf| d@t| d@ƒf} d | d@}| d �rT|�rL|d 7}|d 7}tt| | | | || || ƒVqWdS)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. NÚr:zto r`r;r*rhÚasciir9z, z with format)r€r*rhr�)r Ú_unpack_opargsrEZhasconstr~ZhasnamerÚhasjrelrhZhaslocalZ hascompareZcmp_opZhasfreerr*r�Úboolr rk)ÚcodeÚvarnamesrIÚ constantsÚcellsr{r|ÚlabelsrfriÚoprmrgr}rnrrrrysH         ryr9c Cs<|j|j}tt|ƒƒ}t|j||j|j|j|||d�dS)zDisassemble a code object.)rN) r\r[rwr r)rrZrYrW)r]Úlastirrzr{rrrrJs  )rr|c Cs||dk } | rdnd} xbt|||||||d�D]H} | oF| jdk oF| jdk} | rVt|d�| j|k} t| j| | ƒ|d�q,WdS)Nr`r)r|)r)ryrfrir%rr)r…r‹r†rIr‡rˆr{rr|Z show_linenorqZinstrZnew_source_lineZis_current_instrrrrr)Qs       r)cCstt|dƒ|d�dS)z)rN)rr)rrrrrr+csr+ccshd}x^tdt|ƒdƒD]J}||}|tkrP||d|B}|tkrJ|d>nd}nd}|||fVqWdS)Nrr:r9r<)rBÚlenZ HAVE_ARGUMENTZ EXTENDED_ARG)r…Z extended_argrJrŠrmrrrr‚isr‚cCs`g}xVt|ƒD]J\}}}|dk r|tkr6|d|}n|tkr|}nq||kr|j|ƒqW|S)z`Detect all offsets in a byte code which are jump targets. Return the list of offsets. Nr:)r‚rƒZhasjabsrC)r…r‰rirŠrmZlabelrrrr tsccs–|jddd…}|jddd…}d}|j}d}xPt||ƒD]B\}}|rd||kr\||fV|}||7}|dkrt|d8}||7}q:W||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. rNr:r9r@rA)Ú co_lnotabrxÚzip)r…Zbyte_incrementsZline_incrementsZ lastlinenoÚlinenoZaddrZ byte_incrZ line_incrrrrr ‡s   c@sLeZdZdZdddœdd„Zdd„Zdd „Zed d „ƒZd d „Z dd„Z dS)rzñThe bytecode operations of a piece of code Instantiate this with a function, method, string of code, or a code object (as returned by compile()). Iterating over this yields the bytecode operations as Instruction instances. N)rvÚcurrent_offsetcCsdt|ƒ|_}|dkr&|j|_d|_n||_||j|_|j|j|_tt |ƒƒ|_ ||_ ||_ dS)Nr) rMÚcodeobjrxrvÚ _line_offsetr\r[Ú _cell_namesrwr Ú _linestartsÚ_original_objectr�)rpr.rvr�r]rrrÚ__init__¨s zBytecode.__init__c Cs*|j}t|j|j|j|j|j|j|jd�S)N)r|) r‘ryrrZrYrWr“r”r’)rpr]rrrÚ__iter__µs zBytecode.__iter__cCsdj|jj|jƒS)Nz{}({!r}))ÚformatÚ __class__r-r•)rprrrÚ__repr__¼s zBytecode.__repr__cCs$x|jr|j}qW||jj|jd�S)z/ Construct a Bytecode from the given traceback )r�)r4r5r6r7)Úclsr8rrrÚfrom_tracebackÀs zBytecode.from_tracebackcCs t|jƒS)z3Return formatted information about the code object.)rNr‘)rprrrÚinfoÇsz Bytecode.infocCs`|j}|jdk r|j}nd}tjƒ�2}t|j|j|j|j|j |j |j ||d� |j ƒSQRXdS)z3Return a formatted view of the bytecode operations.Nr9)r†rIr‡rˆr{r|rr‹éÿÿÿÿ) r‘r�ÚioÚStringIOr)rrZrYrWr“r”r’Úgetvalue)rpr]riÚoutputrrrrËs   z Bytecode.dis) r-rsrtrur–r—ršÚ classmethodrœr�rrrrrr s  c Csdddl}|jƒ}|jd|jƒddd�|jƒ}|j�}|jƒ}WdQRXt||jjdƒ}t |ƒdS)z*Simple test program to disassemble a file.rNÚinfileú?ú-)r,ÚnargsÚdefaultr) ÚargparseÚArgumentParserÚ add_argumentZFileTypeÚ parse_argsr¤Úreadrrr)r©ÚparserÚargsr¤rr…rrrÚ_testÝsr°Ú__main__)N)N)NNNNNrrž)ržrž)ržNNNNN)2rur0ÚtypesÚ collectionsrŸZopcoderZ _opcodes_allÚ MethodTypeÚ FunctionTypeÚCodeTyper£Ú staticmethodr,r$ZopmaprrrrrDrLrMrrNr Ú namedtupler_rkrmr}rnrirfrgr r r~rryrr)r+rr‚r r rr°r-rrrrÚsx     #3  2 =