Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (17 sloc) 0.697 kB
from base import *
MAGIC1 = "This is the content of.."
MAGIC2 = " ..the PHP index file"
class Test (TestBase):
def __init__ (self):
TestBase.__init__ (self, __file__)
self.name = "Directory indexer, PHP"
self.request = "GET /directoryindex2/ HTTP/1.0\r\n"
self.expected_error = 200
self.expected_content = MAGIC1+MAGIC2
self.forbidden_content = "<?php"
def Prepare (self, www):
d = self.Mkdir (www, "directoryindex2")
self.WriteFile (d, "test_index.php", 0444,
'<?php echo "%s"."%s"; ?>'%(MAGIC1, MAGIC2))
def Precondition (self):
return os.path.exists (look_for_php())
Jump to Line
Something went wrong with that request. Please try again.