ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- PK] !h0>0> escape.sonuȯELF>@@07@8 @$$ ,, , X ,, , 888$$`$`$`$ Std`$`$`$ PtdP"P"P"LLQtdRtd,, , XXGNUװ%Bj?HXLI<H)H~ʃ0 HXXLH)HQI<ʃ0 -HL$ LD$HHD$XT$THHX~H;L$(sA<;hMRI4/LLHL$@+HL$@H|$(Hl$8HD$0HHP0HLHcH @HPLH)HfA|t;HXD$SwrHHPHt[M"H)LLCD,"<SIcL>fDH5LLfLI9tMH)LL}HLHJHE%I fH5iLMH)LLYA DH MLAHt$DD$5ADD$6LLI9tMH)LLH\$ HLHH%I DH5LLHHt$HT$Ht$HT$I@H|$ IJfDHD$ HXL`9fHH H=VH0"H5KHH H= H55H H= HH5H H= HH5H= H*H5H=g HKH5H5H H=I H55 H=> HDHH=~H HHHUTF-8ISO-8859-1'&"<>+CGIEscapeUtilunescapeHTMLunescape@@accept_charsetlL;LhP@ @pzRx $0FJ w?:*3$"DH\FBB B(A0A8Fl 8A0A(B BBBF HDFBB B(A0A8D] 8A0A(B BBBG HHFBB B(A0A8D`v 8D0A(B BBBK H@'FBB B(A0A8D] 8A0A(B BBBG H)H\GNU, ix  , , o`  . pX   oo ooP o,  0@P`p 0@P`pGA$3a1 ) GA$3p1113 GA*GA$annobin gcc 8.5.0 20210514GA$plugin name: gcc-annobinGA$running gcc 8.5.0 20210514GA*GA*GA! GA*FORTIFYGA+GLIBCXX_ASSERTIONS GA*GOW*GA*cf_protectionGA+omit_frame_pointerGA+stack_clashGA!stack_realign GA*FORTIFYGA+GLIBCXX_ASSERTIONSescape.so-2.5.9-115.module_el8.10.0+4212+150d00eb.x86_64.debughzM7zXZִF!t/9]?Eh=ڊ2N-lPj[3 k  qs]܀?)bp삁5zDn8m(Ty՞ 8z8U1}>d1zfwz}oNwzX-#(L9$+1)Bukɿ4t2DZ&=I;?E4 ?vQ݇]rXlF8'븃˵::k:]tOm ι3v0w@lU6Io&lDʿ\~vʡntp `1#U< W-JZG5ܣ m#J͜bQP!0H])IBhr 3%ܸu"ٱމYn Z{ρd3_9vW u2]aY$@ʥ0C(b#;t :?S jmanL  5)nnD,9JnoR-Ƴ+ u3}\%v7ep=q5b0egLn)#1H>ENN3&n=;)  K,jW}7}Sf»beɫq(P"j#F>vӁM:` Lt)y2aT*AgYZ.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.plt.sec.text.fini.rodata.eh_frame_hdr.eh_frame.note.gnu.property.init_array.fini_array.data.rel.ro.dynamic.got.bss.gnu.build.attributes.gnu_debuglink.gnu_debugdata 88$o``8( 08oP P VEo 0T ^BX X ph c nw@@}  , , $P"P"L""`$`$ , ,, ,, ,, ,. .P0 0((0`0HH2D2|6"PK]-;wiki.pyonu[ ^c@skdZddlZddlZddlZddlZddlZejZdZdddYZdS(s0Wiki main program. Imported and run by cgi3.py.iNcCsotj}dGHH|jdd}|jdd}t|}t|d|dp^|j}||dS(NsContent-type: text/htmltcmdtviewtpaget FrontPagetcmd_(tcgit FieldStoragetgetvaluetWikiPagetgetattrtNonetcmd_view(tformRRtwikitmethod((s%/usr/lib64/python2.7/Demo/cgi/wiki.pytmains  RcBseZejZejjej dZ dZ dZ dZ ddZdZdZdZd Zdd Zd Zd Zd ZRS(icCs2|j|stdn||_|jdS(Nspage name is not a wiki word(t iswikiwordt ValueErrortnametload(tselfR((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyt__init__s  cCsdGt|j|jGdGHdGHx?|jjD].}|j}|sTdGHq4|j|GHq4WdGHdG|jd|jddGH|jdd d d GHdS( Ns

s

s

s


teditsEdit this paget;RRsgo to front paget.(tescapet splitwikiwordRtdatat splitlinestrstript formatlinetmklink(RR tline((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyR s cCsg}xtjd|D]}}|j|r}tjj|j|ra|jd||}q|jd||d}n t|}|j |qWdj |S(Ns(\W+)Rtnewt*t( tretsplitRtostpathtisfiletmkfileRRtappendtjoin(RR twordstword((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyR(s tChangecCsZdG|G|jGdGHd|jGHd}||jGHdGHd|jGHdGHd|GHd GHdS( Ns

s

s
s7s/s,s
s%s
(Rt scripturlR(RR tlabelts((s%/usr/lib64/python2.7/Demo/cgi/wiki.pytcmd_edit5s    cCs|jddj|_|j}|rIdGHdGHdGt|GHnJdGHd}||jd|jGHdGHd GHd G|jd |j|jGHdS( NttextR#s%

I'm sorry. That didn't work

s8

An error occurred while attempting to write the file:s

ss/s?cmd=view&page=s

OK

s)

If nothing happens, please click here:R(RtstripRtstoreRR/RR(RR terrorR1((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyt cmd_create@s cCs|j|dddS(NR0tCreate(R2(RR ((s%/usr/lib64/python2.7/Demo/cgi/wiki.pytcmd_newQscCstjd|S(Ns[A-Z][a-z]+([A-Z][a-z]*)+(R$tmatch(RR-((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyRTscCsSg}x=|D]5}|r5|jr5|jdn|j|q Wdj|S(Nt R#(tisupperR*R+(RR-tcharstc((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyRWs  cCs2|dkr|j}ntjj|j|dS(Ns.txt(R RR&R'R+thomedir(RR((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyR)_s  cCs'|jd|d|}d||fS(Ns?cmd=s&page=s%s(R/(RRRR3tlink((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyRdscCsYy2t|j}|jj}|jWntk rKd}nX||_dS(NR#(topenR)treadR4tclosetIOErrorR(RtfR((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyRhs  cCs|j}yZt|jd}|j||rT|jd rT|jdn|jdSWntk r}dt|SXdS(Ntws R#s IOError: %s(RRAR)twritetendswithRCRDtstr(RRREterr((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyR5qs   N(t__name__t __module__ttempfilet gettempdirR?R&R'tbasenametsystargvR/RR RR2R7R9RRR R)RRR5(((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyRs         (( t__doc__R&R$RRPRMRRR(((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyts<  PK].cgi2.pyonu[ Afc@sKdZddlZejddlZdZedkrGendS(s%CGI test 2 - basic use of cgi module.iNcCsptj}dGHH|s dGHnLdGHxD|jD]6}||j}dGtj|GdGtj|GHq2WdS(NsContent-type: text/htmls

No Form Keys

s

Form Keys

s

t:(tcgit FieldStoragetkeystvaluetescape(tformtkeyR((s%/usr/lib64/python2.7/Demo/cgi/cgi2.pytmain s  t__main__(t__doc__tcgitbtenableRRt__name__(((s%/usr/lib64/python2.7/Demo/cgi/cgi2.pyts    PK]6fcgi3.pynuȯ#! /usr/bin/python2.7 """CGI test 3 (persistent data).""" import cgitb; cgitb.enable() from wiki import main if __name__ == "__main__": main() PK]``Mcgi0.shnuȯ#! /bin/sh # If you can't get this to work, your web server isn't set up right echo Content-type: text/plain echo echo Hello world echo This is cgi0.sh PK]RqREADMEnu[CGI Examples ------------ Here are some example CGI programs. For a larger example, see ../../Tools/faqwiz/. cgi0.sh -- A shell script to test your server is configured for CGI cgi1.py -- A Python script to test your server is configured for CGI cgi2.py -- A Python script showing how to parse a form cgi3.py -- A Python script for driving an arbitrary CGI application wiki.py -- Sample CGI application: a minimal Wiki implementation PK]4cgi2.pynuȯ#! /usr/bin/python2.7 """CGI test 2 - basic use of cgi module.""" import cgitb; cgitb.enable() import cgi def main(): form = cgi.FieldStorage() print "Content-type: text/html" print if not form: print "

No Form Keys

" else: print "

Form Keys

" for key in form.keys(): value = form[key].value print "

", cgi.escape(key), ":", cgi.escape(value) if __name__ == "__main__": main() PK]_cgi1.pynuȯ#! /usr/bin/python2.7 """CGI test 1 - check server setup.""" # Until you get this to work, your web server isn't set up right or # your Python isn't set up right. # If cgi0.sh works but cgi1.py doesn't, check the #! line and the file # permissions. The docs for the cgi.py module have debugging tips. print "Content-type: text/html" print print "

Hello world

" print "

This is cgi1.py" PK]-hFFcgi3.pyonu[ Afc@sFdZddlZejddlmZedkrBendS(sCGI test 3 (persistent data).iN(tmaint__main__(t__doc__tcgitbtenabletwikiRt__name__(((s%/usr/lib64/python2.7/Demo/cgi/cgi3.pyts   PK]cgi1.pyonu[ Afc@sdZdGHHdGHdGHdS(s CGI test 1 - check server setup.sContent-type: text/htmls

Hello world

s

This is cgi1.pyN(t__doc__(((s%/usr/lib64/python2.7/Demo/cgi/cgi1.pytsPK].cgi2.pycnu[ Afc@sKdZddlZejddlZdZedkrGendS(s%CGI test 2 - basic use of cgi module.iNcCsptj}dGHH|s dGHnLdGHxD|jD]6}||j}dGtj|GdGtj|GHq2WdS(NsContent-type: text/htmls

No Form Keys

s

Form Keys

s

t:(tcgit FieldStoragetkeystvaluetescape(tformtkeyR((s%/usr/lib64/python2.7/Demo/cgi/cgi2.pytmain s  t__main__(t__doc__tcgitbtenableRRt__name__(((s%/usr/lib64/python2.7/Demo/cgi/cgi2.pyts    PK]-;wiki.pycnu[ ^c@skdZddlZddlZddlZddlZddlZejZdZdddYZdS(s0Wiki main program. Imported and run by cgi3.py.iNcCsotj}dGHH|jdd}|jdd}t|}t|d|dp^|j}||dS(NsContent-type: text/htmltcmdtviewtpaget FrontPagetcmd_(tcgit FieldStoragetgetvaluetWikiPagetgetattrtNonetcmd_view(tformRRtwikitmethod((s%/usr/lib64/python2.7/Demo/cgi/wiki.pytmains  RcBseZejZejjej dZ dZ dZ dZ ddZdZdZdZd Zdd Zd Zd Zd ZRS(icCs2|j|stdn||_|jdS(Nspage name is not a wiki word(t iswikiwordt ValueErrortnametload(tselfR((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyt__init__s  cCsdGt|j|jGdGHdGHx?|jjD].}|j}|sTdGHq4|j|GHq4WdGHdG|jd|jddGH|jdd d d GHdS( Ns

s

s

s


teditsEdit this paget;RRsgo to front paget.(tescapet splitwikiwordRtdatat splitlinestrstript formatlinetmklink(RR tline((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyR s cCsg}xtjd|D]}}|j|r}tjj|j|ra|jd||}q|jd||d}n t|}|j |qWdj |S(Ns(\W+)Rtnewt*t( tretsplitRtostpathtisfiletmkfileRRtappendtjoin(RR twordstword((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyR(s tChangecCsZdG|G|jGdGHd|jGHd}||jGHdGHd|jGHdGHd|GHd GHdS( Ns

s

s
s7s/s,s
s%s
(Rt scripturlR(RR tlabelts((s%/usr/lib64/python2.7/Demo/cgi/wiki.pytcmd_edit5s    cCs|jddj|_|j}|rIdGHdGHdGt|GHnJdGHd}||jd|jGHdGHd GHd G|jd |j|jGHdS( NttextR#s%

I'm sorry. That didn't work

s8

An error occurred while attempting to write the file:s

ss/s?cmd=view&page=s

OK

s)

If nothing happens, please click here:R(RtstripRtstoreRR/RR(RR terrorR1((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyt cmd_create@s cCs|j|dddS(NR0tCreate(R2(RR ((s%/usr/lib64/python2.7/Demo/cgi/wiki.pytcmd_newQscCstjd|S(Ns[A-Z][a-z]+([A-Z][a-z]*)+(R$tmatch(RR-((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyRTscCsSg}x=|D]5}|r5|jr5|jdn|j|q Wdj|S(Nt R#(tisupperR*R+(RR-tcharstc((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyRWs  cCs2|dkr|j}ntjj|j|dS(Ns.txt(R RR&R'R+thomedir(RR((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyR)_s  cCs'|jd|d|}d||fS(Ns?cmd=s&page=s%s(R/(RRRR3tlink((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyRdscCsYy2t|j}|jj}|jWntk rKd}nX||_dS(NR#(topenR)treadR4tclosetIOErrorR(RtfR((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyRhs  cCs|j}yZt|jd}|j||rT|jd rT|jdn|jdSWntk r}dt|SXdS(Ntws R#s IOError: %s(RRAR)twritetendswithRCRDtstr(RRREterr((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyR5qs   N(t__name__t __module__ttempfilet gettempdirR?R&R'tbasenametsystargvR/RR RR2R7R9RRR R)RRR5(((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyRs         (( t__doc__R&R$RRPRMRRR(((s%/usr/lib64/python2.7/Demo/cgi/wiki.pyts<  PK]-hFFcgi3.pycnu[ Afc@sFdZddlZejddlmZedkrBendS(sCGI test 3 (persistent data).iN(tmaint__main__(t__doc__tcgitbtenabletwikiRt__name__(((s%/usr/lib64/python2.7/Demo/cgi/cgi3.pyts   PK]cgi1.pycnu[ Afc@sdZdGHHdGHdGHdS(s CGI test 1 - check server setup.sContent-type: text/htmls

Hello world

s

This is cgi1.pyN(t__doc__(((s%/usr/lib64/python2.7/Demo/cgi/cgi1.pytsPK]7wiki.pynu["""Wiki main program. Imported and run by cgi3.py.""" import os, re, cgi, sys, tempfile escape = cgi.escape def main(): form = cgi.FieldStorage() print "Content-type: text/html" print cmd = form.getvalue("cmd", "view") page = form.getvalue("page", "FrontPage") wiki = WikiPage(page) method = getattr(wiki, 'cmd_' + cmd, None) or wiki.cmd_view method(form) class WikiPage: homedir = tempfile.gettempdir() scripturl = os.path.basename(sys.argv[0]) def __init__(self, name): if not self.iswikiword(name): raise ValueError, "page name is not a wiki word" self.name = name self.load() def cmd_view(self, form): print "

", escape(self.splitwikiword(self.name)), "

" print "

" for line in self.data.splitlines(): line = line.rstrip() if not line: print "

" else: print self.formatline(line) print "


" print "

", self.mklink("edit", self.name, "Edit this page") + ";" print self.mklink("view", "FrontPage", "go to front page") + "." def formatline(self, line): words = [] for word in re.split('(\W+)', line): if self.iswikiword(word): if os.path.isfile(self.mkfile(word)): word = self.mklink("view", word, word) else: word = self.mklink("new", word, word + "*") else: word = escape(word) words.append(word) return "".join(words) def cmd_edit(self, form, label="Change"): print "

", label, self.name, "

" print '
' % self.scripturl s = '' print s % self.data print '' print '' % self.name print '
' print '' % label print "
" def cmd_create(self, form): self.data = form.getvalue("text", "").strip() error = self.store() if error: print "

I'm sorry. That didn't work

" print "

An error occurred while attempting to write the file:" print "

", escape(error) else: # Use a redirect directive, to avoid "reload page" problems print "" s = '' print s % (self.scripturl + "?cmd=view&page=" + self.name) print "" print "

OK

" print "

If nothing happens, please click here:", print self.mklink("view", self.name, self.name) def cmd_new(self, form): self.cmd_edit(form, label="Create") def iswikiword(self, word): return re.match("[A-Z][a-z]+([A-Z][a-z]*)+", word) def splitwikiword(self, word): chars = [] for c in word: if chars and c.isupper(): chars.append(' ') chars.append(c) return "".join(chars) def mkfile(self, name=None): if name is None: name = self.name return os.path.join(self.homedir, name + ".txt") def mklink(self, cmd, page, text): link = self.scripturl + "?cmd=" + cmd + "&page=" + page return '%s' % (link, text) def load(self): try: f = open(self.mkfile()) data = f.read().strip() f.close() except IOError: data = "" self.data = data def store(self): data = self.data try: f = open(self.mkfile(), "w") f.write(data) if data and not data.endswith('\n'): f.write('\n') f.close() return "" except IOError, err: return "IOError: %s" % str(err) PK] !h0>0> escape.sonuȯPK]-;i>wiki.pyonu[PK].Scgi2.pyonu[PK]6fVcgi3.pynuȯPK]``MWcgi0.shnuȯPK]RqRXREADMEnu[PK]4=Zcgi2.pynuȯPK]_J\cgi1.pynuȯPK]-hFF^cgi3.pyonu[PK]_cgi1.pyonu[PK].`cgi2.pycnu[PK]-;cwiki.pycnu[PK]-hFF(ycgi3.pycnu[PK]zcgi1.pycnu[PK]7{wiki.pynu[PK2