!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/Xml/Xslt/Exslt/   drwxr-xr-x
Free 2.36 GB of 27.03 GB (8.72%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Functions.py (4.03 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"""
EXSLT 2.0 - Functions (http://www.exslt.org/func/index.html)
WWW: http://4suite.org/XSLT        e-mail: support@4suite.org

Copyright (c) 2001 Fourthought Inc, USA.   All Rights Reserved.
See  http://4suite.org/COPYRIGHT  for license and copyright information
"""

from Ft.Xml import XPath
from Ft.Xml.Xslt import XSL_NAMESPACE, XsltElement
from Ft.Xml.Xslt import XsltRuntimeException
from Ft.Xml.Xslt import ContentInfo, AttributeInfo
from Ft.Xml.Xslt.Exslt.MessageSource import Error as ExsltError
from Ft.Xml.Xslt.XPathExtensions import RtfExpr

EXSL_FUNCTIONS_NS = 'http://exslt.org/functions'

class FunctionElement(XsltElement):

    content = ContentInfo.Seq(
        ContentInfo.Rep(ContentInfo.QName(XSL_NAMESPACE, 'xsl:param')),
        ContentInfo.Template,
        )
    validator = ContentInfo.Validator(content)

    legalAttrs = {
        'name' : AttributeInfo.QNameButNotNCName(required=1),
        }

    doesPrime = 1

    def prime(self, processor, context):
        context.addFunction(self._name, self)
        return

    def __call__(self, context, *args):
        processor = context.processor

        # Save context state as XPath is side-effect free
        ctx_state = context.copy()
        ctx_namespaces = context.processorNss
        ctx_instruction = context.currentInstruction

        context.processorNss = self.namespaces
        context.currentInstruction = self

        # Set the parameter list
        counter = 0
        self.result = u''
        for child in self.children:
            if child.expandedName == (XSL_NAMESPACE, 'param'):
                if counter < len(args):
                    context.varBindings[child._name] = args[counter]
                else:
                    # default
                    child.instantiate(context, processor)
                counter = counter + 1
            else:
                child.instantiate(context, processor)

        # Restore context state
        context.currentInstruction = ctx_instruction
        context.processorNss = ctx_namespaces
        context.set(ctx_state)
        
        return self.result


class ResultElement(XsltElement):
    """
    When an func:result element is instantiated, during the
    instantiation of a func:function element, the function returns
    with its value.
    """

    content = ContentInfo.Template
    validator = ContentInfo.Validator(content)
    legalAttrs = {
        'select' : AttributeInfo.Expression(),
        }

    doesSetup = doesPrime = 1

    def setup(self):
        if not self._select:
            self._select = RtfExpr(self.children)
        return

    def prime(self, processor, context):
        self._function = None
        current = self.parent
        while current:
            # this loop will stop when it hits the top of the tree
            if current.expandedName == (EXSL_FUNCTIONS_NS, 'function'):
                self._function = current
                break
            current = current.parent

        if not self._function:
            raise XsltRuntimeException(ExsltError.RESULT_NOT_IN_FUNCTION, self)

        if not self.isLastChild():
            siblings = self.parent.children
            for node in siblings[siblings.index(self)+1:]:
                if node.expandedName != (XSL_NAMESPACE, 'fallback'):
                    raise XsltRuntimeException(ExsltError.ILLEGAL_RESULT_SIBLINGS,
                                               self)
        return

    def instantiate(self, context, processor):
        context.processorNss = self.namespaces
        context.currentInstruction = self
        self._function.result = self._select.evaluate(context)
        return


class ScriptElement(XsltElement):
    """
    NOT YET IMPLEMENTED

    The top-level func:script element provides an implementation of
    extension functions in a particular namespace.
    """
    pass


ExtNamespaces = {
    EXSL_FUNCTIONS_NS : 'func',
    }

ExtFunctions = {}

ExtElements = {
    (EXSL_FUNCTIONS_NS, 'function'): FunctionElement,
    (EXSL_FUNCTIONS_NS, 'result'): ResultElement,
    #(EXSL_FUNCTIONS_NS, 'script'): ScriptElement,
    }

:: 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 ]--