!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/4Suite/tests/Rdf/   drwxr-xr-x
Free 3.27 GB of 27.03 GB (12.11%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     RdfHelper.py (2.76 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import sys

from Ft.Rdf import BNODE_BASE

def make_anonymous(id, anons):
    if anons.has_key(id):
        return anons[id]
    anon = 'ANONYMOUS%d' % len(anons)
    if sys.hexversion >= 0x2000000:
        anon = unicode(anon)
    anons[id] = anon
    return anon

def change_anonymous(statement, anonymous, anon_ids):
    if statement[0][:len(anonymous)] == anonymous:
        statement[0] = make_anonymous(statement[0], anon_ids)
    if statement[2][:len(anonymous)] == anonymous:
        statement[2] = make_anonymous(statement[2], anon_ids)
    return statement

def make_tuple(statements, source_uri):
    anons = {}
    anonymous = BNODE_BASE
    result = []
    for statement in statements:
        stmt = [statement.subject,
                statement.predicate,
                statement.object,
                statement.uri,
                statement.scope,
                ]
        change_anonymous(stmt, anonymous, anons)
        #change_anonymous(stmt, 'anonymous:', anons)
        result.append(tuple(stmt))
    result.sort()
    return result

def convert_tuple(statements):
    if sys.hexversion >= 0x2000000:
        statements = [ tuple(map(unicode, stmt)) for stmt in statements ]
    else:
        statements = statements[:]
    statements.sort()
    return statements
    
def compare_tuple(expected, actual):
    if sys.hexversion >= 0x2000000:
        expected = [ tuple(map(unicode, stmt)) for stmt in expected ]
        actual = [ tuple(map(unicode, stmt)) for stmt in actual ]
    else:
        actual = actual[:]

    #import pprint
    #print "Expected:"
    #pprint.pprint(expected)
    #print "Compared:"
    #pprint.pprint(actual)
    for stmt in expected:
        try:
            actual.remove(stmt)
        except ValueError:
            print "statement missing from actual: (failed comparison)", stmt
            return 1

    # Zero means equal
    return len(actual)

def print_tuple(statements):
    max_subj = len('subject')
    max_pred = len('predicate')
   max_obj = len('object')
    for statement in statements:
        subj = len(statement[0])
        pred = len(statement[1])
        obj = len(statement[2])
        if subj > max_subj: max_subj = subj
        if pred > max_pred: max_pred = pred
        if obj > max_obj: max_obj = obj

    print '%-*s | %-*s | %-*s' % (max_subj, 'subject',
                                  max_pred, 'predicate',
                                 max_obj, 'object',
                                  )
    print '-'*(max_subj + max_pred + max_obj + 6)

    for statement in statements:
        print '%-*s | %-*s | %-*s' % (max_subj, str(statement[0]),
                                      max_pred, str(statement[1]),
                                      max_obj, str(statement[2]),
                                      )
    return

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