# Warning: this is untested! class TaintString(string): """This is a class for tainted strings, like in Perl. It is string-like and is untainted by default. Functions like os.getenv or cgi.FieldStorage should be encased in wrapper functions which will return tainted strings. These would be called things like taint.os.getenv, and such. If you try to pass tainted strings to functions like taint.os.exec, it would warn you.""" def __init__(self): self.taint = 0 string.__init__(self)