Been bored and skimmed through my old pc. Found some python scripts and was like, "Haven't posted in BG for awhile."
Amazed that it's not obsolete yet..
#Created by: Saibal
"""Web Security Module"""
the_url = str(raw_input("Address: "))
tempfile = urllib.urlopen(the_url).read()
print "Error finding file."
if the_url[-3:] == ".py":
print "Invalid web address."
def runCode(self, statement):
except AttributeError, name:
"Restricted code tried to access forbidden " + \
"attribute:" + str( name ) )
start = web_security()
What this does is exactly, is allow you to enter a url you surf. Once the program connects it the website it displays the websites source, but if the URL has the extension .py it connects and runs the python script. This is a big security hole, and must be fixed. That is why we imported rexec to scan the code, and compare it to the python program. If there are similar objects it will display a message box with the attribute the url .py script tried to access, and won't run the code.
Use it on your python applications, it comes in handy, trust me on that.