By PATX on Aug 06, 2009

phile. is a bare bones security system. it uses one global password. and is run using python and cgi. making it usable on all web servers that have python. you can use this three different ways... one to just protect one page. two to protect many pages of the same site with one global pass... three to protect one page then have other security on different pages.

i myself use this for my website (i have twitter and for my open stuff :p) and it works quite well.
in fact i challenge anybody who thinks they can to try to crack my site. url :P

#!/usr/bin/env python

Copyright (c) 2009 Harrison Erd

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
    claim that you wrote the original software. If you use this software
    in a product, an acknowledgment in the product documentation would be
    appreciated but is not required.

    2. Altered source versions must be plainly marked as such, and must not be
    misrepresented as being the original software.

    3. This notice may not be removed or altered from any source

# all the modules
import cgi
import cgitb; cgitb.enable()
import httplib

# defining all vars needed for the html form and cgi
form = cgi.FieldStorage()
passw = form.getvalue('passw', '(no password given)')

# printing the html (form).
<form method="post" action="/">
<p>password: <input type="text" name="passw"/></p>
<p><input type=submit value="submit">

# if the pass and username are correct then 
# it prints the index page.
if passw == "dogface":
 print("<h2>phile. a private storage system in pure python.</h2>")


Sign in to comment.
Hawkee   -  Aug 07, 2009

You might want to give this a more descriptive title to make it easier to find when searching this site or Google.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.