Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!eweka.nl!hq-usenetpeers.eweka.nl!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'else:': 0.03; 'elif': 0.05; 'skip:\\ 20': 0.07; 'username,': 0.07; 'mess': 0.09; 'replied': 0.09; 'skip:/ 10': 0.09; 'skip:\\ 40': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'template': 0.14; '4:35': 0.16; 'concatenated': 0.16; 'fallback': 0.16; 'filename.': 0.16; "skip:' 60": 0.16; 'skip:\\ 30': 0.16; 'subject:when': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'wed,': 0.18; 'replacing': 0.19; "skip:' 30": 0.19; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'error': 0.23; 'skip:% 10': 0.24; 'why.': 0.24; 'cc:2**0': 0.24; 'script': 0.25; 'skip:" 40': 0.26; 'somewhere': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'skip:p 30': 0.29; '8bit%:3': 0.30; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'code': 0.31; 'posting': 0.31; "skip:' 10": 0.31; 'that.': 0.31; 'letter.': 0.31; 'skip:7 10': 0.31; 'skip:= 20': 0.31; 'subject:other': 0.31; 'subject:website': 0.31; 'yesterday.': 0.31; 'file': 0.32; 'stuff': 0.32; 'url:python': 0.33; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'received:209': 0.37; 'skip:& 10': 0.38; 'pm,': 0.38; 'skip:& 20': 0.39; '12,': 0.39; 'skip:p 20': 0.39; 'url:mail': 0.40; 'skip:u 10': 0.60; 'read': 0.60; 'name': 0.63; 'wall': 0.65; 'below.': 0.71; '8bit%:100': 0.72; 'repeat': 0.74; 'other.': 0.75; '.....': 0.78; 'replies.': 0.84; 'text/html;': 0.84; 'to:addr:support': 0.84; 'joel': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YhGi3JqcKFuN6iUFLQHujuWovYuqqllSXqCECt3RTFs=; b=mZEBq+Nm7btIbXbaUwP60XHJLjpSZw9VQyQBT5CkmTcbde8GUeWrrkpIwQGqBIOiE3 ANybQzxmQDcuTR4RdiTwI8oRTZsWaaxmOfbzgK8dQID22ahggTyGnT/in/EhypMh8/Ye 0S6McM437Uch9p+E0nkVud13/i+zy2uF9dRmdi+Z5K/03gbyWO/Y1effNET1juVhNnVQ y6cU7aLO8SnX68KRE/wlvzYqmE0dUMvB4+nHZpT9Uy90S4xrtM2ZBoi1FQCebc2fNT5g XvJ7fy9cb94vykDS5E2/lJmm4pkiB4hD0+eCsyzuBc3mE0yxhIyraIp5cDqbAb4EoZJP lTIw== MIME-Version: 1.0 X-Received: by 10.52.26.140 with SMTP id l12mr507857vdg.29.1371137746743; Thu, 13 Jun 2013 08:35:46 -0700 (PDT) In-Reply-To: References: Date: Thu, 13 Jun 2013 11:35:46 -0400 Subject: Re: Wrong website loaded when other requested From: Joel Goldstick To: =?UTF-8?B?zp3Ouc66z4zOu86xzr/PgiDOms6/z43Pgc6xz4I=?= Content-Type: multipart/alternative; boundary=20cf307cfcc65537f304df0ae242 Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 283 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371137754 news.xs4all.nl 15947 [2001:888:2000:d::a6]:35992 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47980 --20cf307cfcc65537f304df0ae242 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable So Nick, I am top posting because I don't think you read your replies. I replied yesterday. Read this line below. Read the line below. READ it. READ IT.. each letter. READ it: [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] FileNotFoundError: [Errno 2] \\u0394\\u03b5\\u03bd \\u03c5\\u03c0\\u03ac\\u03c1\\ > > u03c7\\u03b5\\u03b9 \\u03c4\\u03ad\\u03c4\\u03bf\\u03b9\\u03bf > \\u03b1\\u03c1\\u03c7\\u03b5\\u03af\\u03bf \\u03ae > \\u03ba\\u03b1\\u03c4\\u03ac\\u03bb\\u03bf\\u03b3\\u03bf\\u03c2: > '/home/nikos/public_html//home/dauwin/public_html/index.html', referer: > http://superhost.gr/ > [/code] > DO YOU SEE THIS PART: '/home/nikos/public_html//home/dauwin/public_html/index.html', referer: http://superhost.gr/ Do you see that it prepends your nikos path the your dauwin path and file name. It isn't replacing one with the other. Somewhere in your SFBI mess of code you perhaps have set the nikos path as the start of a filename. Check that out DID YOU READ THIS? DID YOU THINK ABOUT IT. Also look up SFBI. It is a good name for you > [/code] > On Wed, Jun 12, 2013 at 4:35 PM, Joel Goldstick w= rote: > > > > On Wed, Jun 12, 2013 at 1:33 PM, =CE=9D=CE=B9=CE=BA=CF=8C=CE=BB=CE=B1=CE= =BF=CF=82 =CE=9A=CE=BF=CF=8D=CF=81=CE=B1=CF=82 wrote: > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RewriteEngine Off >> RewriteCond %{REQUEST_FILENAME} -f >> RewriteRule ^/?(.+\.html) /cgi-bin/metrites.py?file=3D%{**REQUEST_FILENA= ME} >> [L,PT,QSA] >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> >> [code] >> file =3D form.getvalue('file') >> page =3D form.getvalue('page') >> >> if not page and os.path.exists( file ): >> # it is an html template >> page =3D file.replace( '/home/dauwin/public_html/', '' ) >> elif page or form.getvalue('show'): >> # it is a python script >> page =3D page..replace( '/home/dauwin/public_html/cgi-**bin/', '= ' ) >> else: >> #when everything else fails fallback >> page =3D "index.html" >> >> .... >> .... >> >> if page.endswith('.html'): >> with open( '/home/dauwin/public_html/' + page, >> encoding=3D'utf-8' ) as f: >> htmlpage =3D f.read() >> htmlpage =3D htmlpage % (quote, music) >> template =3D htmlpage + counter >> elif page.endswith('.py'): >> pypage =3D subprocess.check_output( >> '/home/dauwin/public_html/cgi-**bin/' + page ) >> pypage =3D pypage.decode('utf-8').**replace( >> 'Content-type: text/html; charset=3Dutf-8', '' ) >> template =3D pypage + counter >> >> print( template ) >> [/code] >> >> Everything as you see point to 'dauwin' username, yet the error still >> says: >> >> [code] >> [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] File >> "/home/nikos/public_html/cgi-**bin/metrites.py", line 219, in , >> referer: http://superhost.gr/ >> [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] with open( >> '/home/nikos/public_html/' + page, encoding=3D'utf-8' ) as f:, referer: >> http://superhost.gr/ >> [Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] >> FileNotFoundError: [Errno 2] \\u0394\\u03b5\\u03bd >> \\u03c5\\u03c0\\u03ac\\u03c1\\**u03c7\\u03b5\\u03b9 >> \\u03c4\\u03ad\\u03c4\\u03bf\\**u03b9\\u03bf >> \\u03b1\\u03c1\\u03c7\\u03b5\\**u03af\\u03bf \\u03ae >> \\u03ba\\u03b1\\u03c4\\u03ac\\**u03bb\\u03bf\\u03b3\\u03bf\\**u03c2: >> '/home/nikos/public_html//**home/dauwin/public_html/index.**html', >> referer: http://superhost.gr/ >> [/code] >> >> >> Notice that you have the file path you want concatenated to your > /home/nikos/... stuff in the line above. Look in your code to find out > why. Fix that. Lather, rinse, repeat > >> Why is pointing to /home/nikos isntead of /home/dauwin ? >> >> this is what a smash my head to the wall to understand. >> -- >> http://mail.python.org/**mailman/listinfo/python-list >> > > > > -- > Joel Goldstick > http://joelgoldstick.com > --=20 Joel Goldstick http://joelgoldstick.com --20cf307cfcc65537f304df0ae242 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
So Nick, I am top posting because I don'= ;t think you read your replies.=C2=A0 I replied yesterday.

Rea= d this line below.=C2=A0 Read the line below.=C2=A0 READ it.=C2=A0 READ IT.= . each letter.=C2=A0 READ it:

[Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173]=20 FileNotFoundError: [Errno 2] \\u0394\\u03b5\\u03bd=20 \\u03c5\\u03c0\\u03ac\\u03c1\\
u03c7\\u03b= 5\\u03b9 \\u03c4\\u03ad\\u03c4\\u03bf\\u03b9\\u03bf \\u03b1\\u03c1\\u03c7\\= u03b5\\u03af\\u03bf \\u03ae \\u03ba\\u03b1\\u03c4\\u03ac\\u03bb\\u03bf\\u03= b3\\u03bf\\u03c2: '/home/nikos/public_html//home/dauwin/public_html/ind= ex.html', referer: h= ttp://superhost.gr/
[/code]
DO YOU SEE THIS PART:
=C2=A0'/home/nikos/public_html//h= ome/dauwin/public_html/index.html', referer: http://superhost.gr/

Do you see t= hat it prepends your nikos path the your dauwin path and file name.=C2=A0 I= t isn't replacing one with the other.=C2=A0 Somewhere in your SFBI mess= of code you perhaps have set the nikos path as the start of a filename.=C2= =A0 Check that out


DID YOU READ THIS?=C2=A0 DID YOU THINK ABOUT IT.=C2=A0 Also l= ook up SFBI.=C2=A0 It is a good name for you
[/code]



On Wed, Jun 12, 2013 at 4:35 PM, Joel Goldstick <joel.goldstick@gmail.com> wrote:



On Wed, Jun 1= 2, 2013 at 1:33 PM, =CE=9D=CE=B9=CE=BA=CF=8C=CE=BB=CE=B1=CE=BF=CF=82 =CE=9A= =CE=BF=CF=8D=CF=81=CE=B1=CF=82 <support@superhost.gr> wro= te:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D
RewriteEngine Off
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^/?(.+\.html) /cgi-bin/metrites.py?file=3D%{REQUEST_FILE= NAME} [L,PT,QSA]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

[code]
file =3D form.getvalue('file')
page =3D form.getvalue('page')

if not page and os.path.exists( file ):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 # it is an html template
=C2=A0 =C2=A0 =C2=A0 =C2=A0 page =3D file.replace( '/home/dauwin/public= _html/', '' )
elif page or form.getvalue('show'):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 # it is a python script
=C2=A0 =C2=A0 =C2=A0 =C2=A0 page =3D page..replace( '/home/dauwin/publi= c_html/cgi-bin/', '' )
else:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 #when everything else fails fallback
=C2=A0 =C2=A0 =C2=A0 =C2=A0 page =3D "index.html"

....
....

=C2=A0 =C2=A0 =C2=A0 =C2=A0 if page.endswith('.html'):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 with open( '/ho= me/dauwin/public_html/' + page, encoding=3D'utf-8' ) as f:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 htmlpage =3D f.read()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 htmlpage =3D htmlpa= ge % (quote, music)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 template =3D htmlpa= ge + counter
=C2=A0 =C2=A0 =C2=A0 =C2=A0 elif page.endswith('.py'):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pypage =3D subproce= ss.check_output( '/home/dauwin/public_html/cgi-bin/' + page = )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pypage =3D pypage.d= ecode('utf-8').replace( 'Content-type: text/html; charse= t=3Dutf-8', '' )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 template =3D pypage= + counter

=C2=A0 =C2=A0 =C2=A0 =C2=A0 print( template )
[/code]

Everything as you see point to 'dauwin' username, yet the error sti= ll says:

[code]
[Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] =C2=A0 File "= ;/home/nikos/public_html/cgi-bin/metrites.py", line 219, in <= ;module>, referer: ht= tp://superhost.gr/
[Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] =C2=A0 =C2=A0 wit= h open( '/home/nikos/public_html/' + page, encoding=3D'utf-8= 9; ) as f:, referer: htt= p://superhost.gr/
[Tue Jun 11 21:59:31 2013] [error] [client 79.103.41.173] FileNotFoundError= : [Errno 2] \\u0394\\u03b5\\u03bd \\u03c5\\u03c0\\u03ac\\u03c1\\u03c= 7\\u03b5\\u03b9 \\u03c4\\u03ad\\u03c4\\u03bf\\u03b9\\u03bf \\u03b1\\= u03c1\\u03c7\\u03b5\\u03af\\u03bf \\u03ae \\u03ba\\u03b1\\u03c4\\u03= ac\\u03bb\\u03bf\\u03b3\\u03bf\\u03c2: '/home/nikos/publi= c_html//home/dauwin/public_html/index.html', referer: http://superhost.gr/ [/code]


Notice that you have the file path you wa= nt concatenated to your /home/nikos/... stuff in the line above.=C2=A0 Look= in your code to find out why. Fix that.=C2=A0 Lather, rinse, repeat
Why is pointing to /home/nikos isntead of /home/dauwin ?

this is what a smash my head to the wall to understand.
--
http://mail.python.org/mailman/listinfo/python-list



--



--
J= oel Goldstick
http://joelgoldstick.com
--20cf307cfcc65537f304df0ae242--