KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/22697/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/22697/root/usr/lib64/python2.4/gopherlib.pyo
mň
‚=5Dc@s`dZddgZdZdZdZdZdZdZd	Zd
Z	dZ
dZd
ZdZ
dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZeƒZha d„Z!dZ"d Z#d!d"„Z$d!d#„Z%d$„Z&d%„Z'd&„Z(d'„Z)d(„Z*d)„Z+d*„Z,d+„Z-e.d,joe-ƒnd-S(.s!Gopher protocol client interface.t
send_selectort
send_querys1/sgopher.micro.umn.eduiFt0t1t2t3t4t5t6t7t8t9t+tstetcthtTtMtItwtqtgt:t;t<cCsothjo>x;tD]/}|d djo|dtt|ƒ<qqWn|tjot|Snd|fS(s=Map all file types to strings; unknown types become TYPE='x'.itA_sTYPE=%rN(t_type_to_name_mapt_namestnametevaltgtype(RR((t!/usr/lib64/python2.4/gopherlib.pyttype_to_name)s
 
s
s	icCsădk}|pC|idƒ}|djo#|| t||dƒ}}qSn|p
t}n*t|ƒtdƒjot|ƒ}n|i|i|i	ƒ}|i||fƒ|i|tƒ|idƒ|idƒS(sGSend a selector to a given host and port, return a file with the reply.NRiittrb(tsockettportthosttfindtitinttDEF_PORTttypetAF_INETtSOCK_STREAMR
tconnecttsendalltselectortCRLFtshutdowntmakefile(R0R&R%R$R(R
((R R8s	
'

cCst|d|||ƒS(s#Send a selector and a query string.s	N(RR0tqueryR&R%(R0R4R&R%((R RIscCs!|djodSn	|dSdS(sJTakes a path as returned by urlparse and returns the appropriate selector.t/iN(tpath(R6((R tpath_to_selectorMs
cCs'|djodSnt|dƒSdS(sjTakes a path as returned by urlparse and maps it to a string.
    See section 3.4 of RFC 1738 for details.R5sTYPE='unknown'iN(R6R!(R6((R tpath_to_datatype_nameTs
cCs?g}x2|iƒ}|p
dGHPn|dtjo|d }n |dtjo|d }n|djoPn|pdGHq	n|d}|ditƒ}t	|ƒdjod	|fGHq	nt	|ƒdjo-|dd
gjodG|dGdGHqn|i
d
ƒ|id|ƒ|i
|ƒq	W|S(s1Get a directory in the form of a list of entries.is(Unexpected EOF from server)iţ˙˙˙i˙˙˙˙t.s(Empty line from server)iis(Bad line from server: %r)Rs(Extra info from server:t)R"N(tentriestftreadlinetlineR1RtsplittTABtpartstlentappendtinsert(R<RAR;RR>((R t
get_directory`s<


cCsg}t||iƒ|S(s@Get a text file as a list of lines, with trailing CRLF stripped.N(tlinestget_alt_textfileR<RC(R<RF((R tget_textfile€scCs˘x›|iƒ}|p
dGHPn|dtjo|d }n |dtjo|d }n|djoPn|d djo|d}n||ƒqWdS(	sNGet a text file and pass each line to a function, with trailing CRLF stripped.is(Unexpected EOF from server)iţ˙˙˙i˙˙˙˙R9is..N(R<R=R>R1tfunc(R<RIR>((R RG†s 
cCs|iƒ}|S(s*Get a binary file as one solid data block.N(R<treadtdata(R<RK((R t
get_binary—scCs1x*|i|ƒ}|pPn||ƒqWdS(s4Get a binary file and pass each block to a function.iN(R<RJt	blocksizeRKRI(R<RIRMRK((R tget_alt_binaryœsc
CsĘdk}dk}|i|iddƒ\}}t}|d}t}|o|d}|d}n|oŠ|d}|d}t
|ƒdjo|d|}}n&d}|o|d}|d}nd}|o|d}|d}q÷n|tjot
|||ƒ}	nt||ƒ}	|tjo&t|	ƒ}
x|
D]}|GHqIWnk|ttfjo&t|	ƒ}xH|D]}|GHq‚Wn2t|	ƒ}dGt
|ƒGdGt|d ƒd GHdS(	sTrivial test program.NiR"isbinary data:sbytes:idi((tsystgetopttargvtoptstargstDEF_SELECTORR0R+tDEF_HOSTR&RBR4tA_INDEXRR<RtA_TEXTRHRFtitemtA_MENURER;RLRKtrepr(
R;R4RPR+RSR0ROR&RKR<RFRXRR((R ttest¤sL		









t__main__N(/t__doc__t__all__RTRUR*RWRYtA_CSOtA_ERRORtA_MACBINHEXt
A_PCBINHEXtA_UUENCODEDRVtA_TELNETtA_BINARYtA_DUPLICATEtA_SOUNDtA_EVENTt
A_CALENDARtA_HTMLtA_TN3270tA_MIMEtA_IMAGEtA_WHOIStA_QUERYtA_GIFtA_WWWtA_PLUS_IMAGEtA_PLUS_MOVIEtA_PLUS_SOUNDtdirRRR!R1R@RRR7R8RERHRGRLRNR[t__name__(+R`R_RrRpRRnRURcRsR^RNRRkRjRaRER!R@R[RmRHRhRoRqRGRRtR1RWR*RgRbR8RlRTRiR7RVRdRLReRfRY((R t?s^					 					(


Anon7 - 2021