!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/lib/python2.4/site-packages/Ft/Server/Server/SCore/   drwxr-xr-x
Free 3.75 GB of 27.03 GB (13.89%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     RawFileImp.py (4.57 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
########################################################################
# $Header: /var/local/cvsroot/4Suite/Ft/Server/Server/SCore/RawFileImp.py,v 1.17 2005/01/16 07:34:38 jkloth Exp $
"""
Rawfile repository resource class.

Copyright 2003 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/
"""

import types

import ResourceMetaDataImp

from Ft.Server import FTSERVER_NAMESPACE
from Ft.Server.Common import ResourceTypes, Schema
from Ft.Server.Common import SchematronStylesheet, XmlLib
from Ft.Server.Server import FtServerServerException, Error
from Ft.Server.Server.Drivers import FtssDriver, FtssInputSource
from Ft.Xml.XLink import XLINK_NAMESPACE
from Ft.Xml.Xslt import StylesheetReader

class RawFileImp(ResourceMetaDataImp.ResourceMetaDataImp):
    """
    Every resource in the repository is a RawFile
    """
    resourceType = ResourceTypes.ResourceType.RAW_FILE

    def getMetaDataResource(self):
        """
        Get the string meta data of this resource
        """
        self._verifyTx()
        p = self._path.normalize(".;metadata;no-traverse")
        return self._fetchResource(p)

    def getContentResource(self):
        """
        Get the resource the represents the content of this object
        """
        self._verifyTx()
        return self

    def getImt(self):
        """
        Returns the Internet Media Type of the raw file resource
        """
        self._verifyTx()
        res = self._driver.getSystemModel().complete(self._path.absolutePath, Schema.IMT, None)
        if not res:
            raise FtServerServerException(Error.UNKNOWN_PATH,
                                          path = self._path)
        return res[0].object


    def getContent(self):
        """
        Get the string content of this resource
        """
        self._verifyTx()
        return self._driver.fetchResource(self._path)




    ##########################################
    #XML Interfaces
    ##########################################
    def asStylesheet(self):
        """
        Return this object as a non-live compiled stylesheet
        """
        self._verifyTx()

        reader = StylesheetReader.StylesheetReader()
        # register extension elements with the reader
        # NOTE: this is only needed for compiled stylesheets as
        #  the Processor interface will take care of this
        functions, elements = self.getExtFunctionsAndElements()
        reader.addExtensionElementMapping(elements)

        isrc = FtssInputSource.FtssInputSourceFactory.fromString(
                self.getContent(),
                self._path.absolutePathAsUri,
                self._driver)
        return reader.fromSrc(isrc)

    def asSchematron(self):
        """
        Return this object as a non-live compiled schematron document
        """
        self._verifyTx()
        return SchematronStylesheet.ParseSchematron(
                self.getContent(),
                self._path.absolutePathAsUri,
                self._driver)


    ##########################################
    #Mutation Interfaces
    ##########################################
    def setImt(self,imt):
        """
        Sets the Internet Media Type of the raw file resource
        """
        self._verifyTx()
        xu = XmlLib.MakeString(SET_IMT_XUPDATE%(FTSERVER_NAMESPACE,XLINK_NAMESPACE,imt))
        self._driver.xupdateMetaData(self._path,xu)

    def setContent(self,src):
        """
        Set the string content of this resource
        """
        self._verifyTx()
        if type(src) != types.StringType:
            raise TypeError("src must be a string object")

        self._driver.updateResourceContent(self._path,src)




SET_IMT_XUPDATE="""<xupdate:modifications
  version="1.0"
  xmlns:xupdate="http://www.xmldb.org/xupdate"
  xmlns:ftss="%s"
  xmlns:xlink="%s"
>
  <xupdate:update select="/ftss:MetaData/ftss:Imt">%s</xupdate:update>
</xupdate:modifications>
"""



def NewRawFileXml(driver,path,acl,owner,imt,src):

    a = driver.aclToXml(acl)
    t = FtssDriver.CurrentTime()
    md = """<ftss:MetaData xmlns:ftss="%s" path='%s' type='%s' creation-date='%s'>
  %s
  <ftss:LastModifiedDate>%s</ftss:LastModifiedDate>
  <ftss:Owner>%s</ftss:Owner>
  <ftss:Imt>%s</ftss:Imt>
  <ftss:Size>%d</ftss:Size>
</ftss:MetaData>
        """ % (FTSERVER_NAMESPACE,
               path,
               Schema.g_rdfResourceTypes[ResourceTypes.ResourceType.RAW_FILE],
               t,
               a,
               t,
               owner,
               imt,
               len(src))
    return XmlLib.MakeString(md)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0036 ]--