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
ó k]Œjc@sÊdZdZddlmZddlZddlZddlZddlZddlm Z m Z m Z e ƒ�Iej rže dde ƒe dde ƒnddlZddlZWdQXydd lmZWn!ek ródd lmZnXd d d d ddddddddddddddgZdZead„Zd„Zd„Zead aeejd d d!d"„Zd d d!d#„Zd d d!d$„Zd!d%„Z d&„Z!d'„Z"d fd(„ƒYZ#d fd)„ƒYZ$d ejfd*„ƒYZ%d e%fd+„ƒYZ&de&fd,„ƒYZ'de%fd-„ƒYZ(ejd.„Z)eeeed/„Z*ejd0„Z+d1„Z,d2„Z-d3„Z.d4„Z/ed5„Z0d6d7„Z1e2d8krÆe)ƒndS(9s�Support module for CGI (Common Gateway Interface) scripts. This module defines a number of utilities for use by CGI scripts written in Python. s2.6iÿÿÿÿ(t attrgetterN(tfilterwarningstcatch_warningstwarntignores.*mimetools has been removeds.*rfc822 has been removed(tStringIOtMiniFieldStoraget FieldStoragetFormContentDicttSvFormContentDicttInterpFormContentDictt FormContenttparsetparse_qst parse_qsltparse_multipartt parse_headertprint_exceptiont print_environt print_formtprint_directorytprint_argumentstprint_environ_usagetescapetcGsZtr7t r7yttdƒaWq7tk r3q7XntsFtantat|ŒdS(s„Write a log message, if there is a log file. Even though this function is called initlog(), you should always use log(); log is a variable that is set either to initlog (initially), to dolog (once the log file has been opened), or to nolog (when logging is disabled). The first argument is a format string; the remaining arguments (if any) are arguments to the % operator, so e.g. log("%s: %s", "a", "b") will write "a: b" to the log file, followed by a newline. If the global logfp is not None, it should be a file object to which log data is written. If the global logfp is None, the global logfile may be a string giving a filename to open, in append mode. This file should be world writable!!! If the file can't be opened, logging is silently disabled (since there is no safe place where we could send an error message). taN(tlogfiletlogfptopentIOErrortnologtlogtdolog(tallargs((s/usr/lib64/python2.7/cgi.pytinitlogGs   cGstj||dƒdS(s=Write a log message to the log file. See initlog() for docs.s N(Rtwrite(tfmttargs((s/usr/lib64/python2.7/cgi.pyR jscGsdS(s9Dummy function, assigned to log when logging is disabled.N((R!((s/usr/lib64/python2.7/cgi.pyRnsit&c Cs˜|dkrtj}nd|kr1d|d                cCs)tdtdƒtj|||d|ƒS(s)Parse a query given as a string argument.s9cgi.parse_qs is deprecated, use urlparse.parse_qs insteadiR+(RtPendingDeprecationWarningR6R (R>R9R:R+((s/usr/lib64/python2.7/cgi.pyR ¹s cCs)tdtdƒtj|||d|ƒS(s)Parse a query given as a string argument.s;cgi.parse_qsl is deprecated, use urlparse.parse_qsl insteadiR+(RR?R6R(R>R9R:R+((s/usr/lib64/python2.7/cgi.pyRÁs cCs�d}d|kr|d}nt|ƒs>td|f‚nd|}d|d}i}d}x&||krŠd}d} |rtj|ƒ} | jdƒ} | rÎyt| ƒ}WqÎtk rÊqÎXn|dkr trø|tkrøtd‚n|j|ƒ} qd} ng} xa|j ƒ} | s8|}Pn| d dkrm| j ƒ}|||fkrmPqmn| j | ƒq| dkr�qen|dkr| r| d} | d d krÈ| d } n| dd krå| d } n| | dqend|kre|d}nqe||krz||j | ƒqe| g||tcdispR<R;tclen((s/usr/lib64/python2.7/cgi.pyRg’s†                                   cCsd|j|j|jfS(s"Return a printable representation.sFieldStorage(%r, %r, %r)(RARlRe(Rf((s/usr/lib64/python2.7/cgi.pyRhscCst|jƒƒS(N(titertkeys(Rf((s/usr/lib64/python2.7/cgi.pyt__iter__ scCsx|dkrt|‚n|jrS|jjdƒ|jjƒ}|jjdƒn!|jdk rn|j}nd}|S(NRei(tAttributeErrorRotseekR4RmR.(RfRARe((s/usr/lib64/python2.7/cgi.pyt __getattr__s    cCsˆ|jdkrtd‚ng}x0|jD]%}|j|kr+|j|ƒq+q+W|sft|‚nt|ƒdkr€|dS|SdS(sDictionary style indexing.s not indexableiiN(RmR.t TypeErrorRARHtKeyErrorRY(RfRStfoundtitem((s/usr/lib64/python2.7/cgi.pyt __getitem__s  cCsS||krK||}t|ƒtgƒkrAttdƒ|ƒS|jSn|SdS(s8Dictionary style get() method, including 'value' lookup.ReN(RntmapRRe(RfRStdefaultRe((s/usr/lib64/python2.7/cgi.pytgetvalue+s    cCsK||krC||}t|ƒtgƒkr9|djS|jSn|SdS(s! Return the first value received.iN(RnRe(RfRSRŒRe((s/usr/lib64/python2.7/cgi.pytgetfirst6s     cCsV||krN||}t|ƒtgƒkrAttdƒ|ƒS|jgSngSdS(s Return list of received values.ReN(RnR‹RRe(RfRSRe((s/usr/lib64/python2.7/cgi.pytgetlistAs    cCs8|jdkrtd‚nttd„|jDƒƒƒS(sDictionary style keys() method.s not indexablecss|]}|jVqdS(N(RA(t.0R‰((s/usr/lib64/python2.7/cgi.pys PsN(RmR.R†tset(Rf((s/usr/lib64/python2.7/cgi.pyR�Ls cs8|jdkrtd‚nt‡fd†|jDƒƒS(s"Dictionary style has_key() method.s not indexablec3s|]}|jˆkVqdS(N(RA(R�R‰(RS(s/usr/lib64/python2.7/cgi.pys VsN(RmR.R†tany(RfRS((RSs/usr/lib64/python2.7/cgi.pythas_keyRs cs8|jdkrtd‚nt‡fd†|jDƒƒS(s%Dictionary style __contains__ method.s not indexablec3s|]}|jˆkVqdS(N(RA(R�R‰(RS(s/usr/lib64/python2.7/cgi.pys \sN(RmR.R†R’(RfRS((RSs/usr/lib64/python2.7/cgi.pyt __contains__Xs cCst|jƒƒS(s Dictionary style len(x) support.(RYR�(Rf((s/usr/lib64/python2.7/cgi.pyt__len__^scCs t|jƒS(N(tboolRm(Rf((s/usr/lib64/python2.7/cgi.pyt __nonzero__bscCs˜|jj|jƒ}|jr2|d|j7}ng|_}xHtj||j|jd|j ƒD]"\}}|j t ||ƒƒqdW|j ƒdS(s+Internal: read data in query string format.R&R+N( R7R4RxRuRmR6RR9R:R+RHRt skip_lines(RfR>RmRSRe((s/usr/lib64/python2.7/cgi.pyRzes   c Cs4|j}t|ƒs(td|f‚ng|_|jr”xNtj|j|j|jd|j ƒD]%\}}|jj t ||ƒƒqbWd}n|j p£|j}||ji||||d|j ƒ} xV| js%tj|jƒ} ||j| ||||d|j ƒ} |jj | ƒqÐW|jƒdS(s/Internal: read a part that is itself multipart.s&Invalid boundary in multipart form: %rR+N(RwRBR3RmRuR6RR9R:R+RHRR.tFieldStorageClasst __class__R7Rytrfc822RDR˜( RfR8R9R:tibRSReR™tklasstpartRP((s/usr/lib64/python2.7/cgi.pyR{ss*          cCsD|jdkr&|jƒ|jƒn |jƒ|jjdƒdS(sInternal: read an atomic part.iN(Rxt read_binaryR˜t read_linesRoR„(Rf((s/usr/lib64/python2.7/cgi.pyR|�s    iicCs’|jdƒ|_|j}|dkrŽxd|dkrŠ|jjt||jƒƒ}|sgd|_Pn|jj|ƒ|t |ƒ}q*WndS(sInternal: read binary data.tbiiÿÿÿÿN( t make_fileRoRxR7R4tmintbufsizeRyR#RY(RfttodoRO((s/usr/lib64/python2.7/cgi.pyRŸ˜s   cCs7tƒ|_|_|jr)|jƒn |jƒdS(s0Internal: read lines until EOF or outerboundary.N(RRot_FieldStorage__fileRvtread_lines_to_outerboundarytread_lines_to_eof(Rf((s/usr/lib64/python2.7/cgi.pyR ¥s  cCs||jdk rh|jjƒt|ƒdkrh|jdƒ|_|jj|jjƒƒd|_qhn|jj|ƒdS(NièR(R¦R.ttellRYR¢RoR#R�(RfRR((s/usr/lib64/python2.7/cgi.pyt__write­s cCs<x5|jjdƒ}|s(d|_Pn|j|ƒqdS(sInternal: read lines until EOF.iiiÿÿÿÿNi(R7RFRyt_FieldStorage__write(RfRR((s/usr/lib64/python2.7/cgi.pyR¨µs  cCsd|j}|d}d}t}xë|jjd ƒ}|sKd|_Pn|d dkr™|r™|jƒ}||kr}Pn||kr™d|_Pq™n|}|ddkrÈd}|d }t}n5|dd krñd }|d }t}n d}t}|j||ƒq&d S( s)Internal: read lines until outerboundary.s--Riiiÿÿÿÿiiþÿÿÿs s Ni(RvtTrueR7RFRyRGtFalseR«(RfR_tlasttdelimtlast_line_lfendRRt strippedlinetodelim((s/usr/lib64/python2.7/cgi.pyR§¾s8           cCsÀ|j s|jrdSd|j}|d}t}x…|jjdƒ}|s\d|_Pn|d dkrª|rª|jƒ}||krŽPn||krªd|_Pqªn|jdƒ}q7dS( s5Internal: skip lines until outer boundary if defined.Ns--iiiÿÿÿÿis i(RvRyR¬R7RFRGtendswith(RfR_R®R°RRR±((s/usr/lib64/python2.7/cgi.pyR˜Þs$       cCsddl}|jdƒS(s±Overridable: return a readable & writable file. The file will be used as follows: - data is written to it - seek(0) - data is read from it The 'binary' argument is unused -- the file is always opened in binary mode. This version opens a temporary file for reading and writing, and immediately deletes (unlinks) it. The trick (on Unix!) is that the file can still be used, but it can't be opened by another process, and it will automatically be deleted when it is closed or when the current process terminates. If you want a more permanent file, you derive a class which overrides this method. If you want a visible temporary file that is nevertheless automatically deleted when the script terminates, try defining a __del__ method in a derived class which unlinks the temporary files you have created. iÿÿÿÿNsw+b(ttempfilet TemporaryFile(RftbinaryR´((s/usr/lib64/python2.7/cgi.pyR¢ós Ni (RiRjRkR.tosR8RgRhR‚R…RŠR�RŽR�R�R“R”R•R—RzR™R{R|R¤RŸR R«R¨R§R˜R¢(((s/usr/lib64/python2.7/cgi.pyRgs8)   t              cBs#eZdZejddd„ZRS(sxForm content as dictionary with a list of values per field. form = FormContentDict() form[key] -> [value, value, ...] key in form -> Boolean form.keys() -> [key, key, ...] form.values() -> [[val, val, ...], [val, val, ...], ...] form.items() -> [(key, [val, val, ...]), (key, [val, val, ...]), ...] form.dict == {key: [val, val, ...], ...} icCs6td|d|d|ƒ|_|_|d|_dS(NR8R9R:R-(R tdictROt query_string(RfR8R9R:((s/usr/lib64/python2.7/cgi.pyRg s (RiRjRkR·R8Rg(((s/usr/lib64/python2.7/cgi.pyRs cBs2eZdZd„Zd„Zd„Zd„ZRS(s÷Form content as dictionary expecting a single value per field. If you only expect a single value for each field, then form[key] will return that single value. It will raise an IndexError if that expectation is not true. If you expect a field to have possible multiple values, than you can use form.getlist(key) to get all of the values. values() and items() are a compromise: they return single strings where there is a single value, and lists of strings otherwise. cCs4t|j|ƒdkr%td‚n|j|dS(Nisexpecting a single valuei(RYR¸t IndexError(RfRS((s/usr/lib64/python2.7/cgi.pyRŠ3s cCs |j|S(N(R¸(RfRS((s/usr/lib64/python2.7/cgi.pyR�7scCsWg}xJ|jjƒD]9}t|ƒdkrB|j|dƒq|j|ƒqW|S(Nii(R¸tvaluesRYRH(RftresultRe((s/usr/lib64/python2.7/cgi.pyR»9s cCsig}x\|jjƒD]K\}}t|ƒdkrN|j||dfƒq|j||fƒqW|S(Nii(R¸titemsRYRH(RfR¼RSRe((s/usr/lib64/python2.7/cgi.pyR½@s (RiRjRkRŠR�R»R½(((s/usr/lib64/python2.7/cgi.pyR 's     cBs)eZdZd„Zd„Zd„ZRS(s7This class is present for backwards compatibility only.cCsstj||ƒ}|ddkriyt|ƒSWqitk reyt|ƒSWqftk raqfXqiXn|jƒS(Nis 0123456789+-.(R RŠR1R3tfloatRG(RfRStv((s/usr/lib64/python2.7/cgi.pyRŠKs  cCs^g}xQ|jƒD]C}y|j||ƒWqtk rU|j|j|ƒqXqW|S(N(R�RHRºR¸(RfR¼RS((s/usr/lib64/python2.7/cgi.pyR»Ss cCsjg}x]|jƒD]O}y|j|||fƒWqtk ra|j||j|fƒqXqW|S(N(R�RHRºR¸(RfR¼RS((s/usr/lib64/python2.7/cgi.pyR½[s "(RiRjRkRŠR»R½(((s/usr/lib64/python2.7/cgi.pyR Is  cBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s7This class is present for backwards compatibility only.cCs"||jkr|j|SdSdS(N(R¸R.(RfRS((s/usr/lib64/python2.7/cgi.pyR»gs cCsF||jkr>t|j|ƒ|kr7|j||SdSndSdS(N(R¸RYR.(RfRStlocation((s/usr/lib64/python2.7/cgi.pyt indexed_valuejs cCs&||jkr|j|dSdSdS(Ni(R¸R.(RfRS((s/usr/lib64/python2.7/cgi.pyRepscCst|j|ƒS(N(RYR¸(RfRS((s/usr/lib64/python2.7/cgi.pyRxsscCs,||jkr$|j|djƒSdSdS(Ni(R¸RGR.(RfRS((s/usr/lib64/python2.7/cgi.pytstrippeduscCs|jS(N(R¸(Rf((s/usr/lib64/python2.7/cgi.pytparsxs( RiRjRkR»RÁReRxRÂRÃ(((s/usr/lib64/python2.7/cgi.pyR es     cCsÉdGHHtjt_yWtƒ}tƒtƒt|ƒt|ƒtƒd„}|d„}dGH|ƒWnt ƒnXdGHda y/tƒ}tƒtƒt|ƒt|ƒWnt ƒnXdS(s—Robust test CGI script, usable as main program. Write minimal HTTP headers and dump all information provided to the script in HTML form. sContent-type: text/htmlcRs ddUdS(Ns,testing print_exception() -- italics?((((s/usr/lib64/python2.7/cgi.pyR\�scSs |ƒdS(N((R\((s/usr/lib64/python2.7/cgi.pytg’ss9

What follows is a test, not an actual exception:

s*

Second try with a small maxlen...

i2N( R/tstdouttstderrRRRRRRRR2(R8tformR\RÄ((s/usr/lib64/python2.7/cgi.pyttests4          cCs‹|dkr$tjƒ\}}}nddl}HdGH|j||ƒ|j||ƒ}dtdj|d ƒƒt|dƒfGH~dS(Niÿÿÿÿs+

Traceback (most recent call last):

s
%s%s
R(R.R/texc_infot tracebackt format_tbtformat_exception_onlyRRI(RnRettbtlimitRÊRm((s/usr/lib64/python2.7/cgi.pyR¦s  cCs]|jƒ}|jƒHdGHdGHx/|D]'}dGt|ƒGdGt||ƒGHq(WdGHHdS(s#Dump the shell environment as HTML.s

Shell Environment:

s
s
s
s
N(R�tsortR(R8R�RS((s/usr/lib64/python2.7/cgi.pyR´s   %cCsš|jƒ}|jƒHdGH|s*dGHndGHx^|D]V}dt|ƒdG||}dttt|ƒƒƒdGHdtt|ƒƒGHq6Wd GHHd S( s$Dump the contents of a form as HTML.s

Form Contents:

s

No form fields.s

s
t:sss
s
N(R�RÏRtreprRn(RÇR�RSRe((s/usr/lib64/python2.7/cgi.pyRÀs    cCsTHdGHytjƒ}Wn+tjk rC}dGtt|ƒƒGHn Xt|ƒGHHdS(s#Dump the current directory as HTML.s#

Current Working Directory:

s os.error:N(R·tgetcwdterrorRtstr(tpwdtmsg((s/usr/lib64/python2.7/cgi.pyRÑs cCsHdGHHtjGHHdS(Ns

Command Line Arguments:

(R/R5(((s/usr/lib64/python2.7/cgi.pyRÝs cCs dGHdS(s9Dump a list of environment variables used by CGI as HTML.sØ

These environment variables could have been set:

  • AUTH_TYPE
  • CONTENT_LENGTH
  • CONTENT_TYPE
  • DATE_GMT
  • DATE_LOCAL
  • DOCUMENT_NAME
  • DOCUMENT_ROOT
  • DOCUMENT_URI
  • GATEWAY_INTERFACE
  • LAST_MODIFIED
  • PATH
  • PATH_INFO
  • PATH_TRANSLATED
  • QUERY_STRING
  • REMOTE_ADDR
  • REMOTE_HOST
  • REMOTE_IDENT
  • REMOTE_USER
  • REQUEST_METHOD
  • SCRIPT_NAME
  • SERVER_NAME
  • SERVER_PORT
  • SERVER_PROTOCOL
  • SERVER_ROOT
  • SERVER_SOFTWARE
In addition, HTTP headers sent by the server may be passed in the environment as well. Here are some common variable names:
  • HTTP_ACCEPT
  • HTTP_CONNECTION
  • HTTP_HOST
  • HTTP_PRAGMA
  • HTTP_REFERER
  • HTTP_USER_AGENT
N((((s/usr/lib64/python2.7/cgi.pyRäs)cCsU|jddƒ}|jddƒ}|jddƒ}|rQ|jddƒ}n|S( s¤Replace special characters "&", "<" and ">" to HTML-safe sequences. If the optional flag quote is true, the quotation mark character (") is also translated.R&s&ts>RVs"(Ra(RZtquote((s/usr/lib64/python2.7/cgi.pyRs s^[ -~]{0,200}[!-~]$cCsddl}|j||ƒS(Niÿÿÿÿ(tretmatch(RZt _vb_patternRÚ((s/usr/lib64/python2.7/cgi.pyRBs t__main__(3Rkt __version__toperatorRR/R·tUserDictR6twarningsRRRt py3kwarningtDeprecationWarningRCR›t cStringIORt ImportErrort__all__RR.RR"R RRR2R8R R RRR]RRRRR R R RÈRRRRRRRRBRi(((s/usr/lib64/python2.7/cgi.pytsr                  #   < b ÿ­"'   /