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


Viewing file:     Uuid.py (3.56 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
########################################################################
# $Header: /var/local/cvsroot/4Suite/Ft/Lib/Uuid.py,v 1.8 2004/08/05 21:57:32 mbrown Exp $
"""
Functions for generating and comparing Universal Unique Identifiers
(UUIDs), based on ideas from e2fsprogs.

A UUID is essentially a 128-bit random number that has a string
representation of 28 hexadecimal digits, hyphenated in groups of
8-4-4-12. The value could be greater than the number of atoms in the
universe; it's extremely unlikely that the same number would ever be
generated twice.

UUIDs are defined by ISO/IEC 11578:1996 (Remote Procedure Call)
and The Open Group's DCE 1.1 (Distributed Computing Environment) spec
(the ISO version was based on an earlier version of the DCE spec).
See http://www.opengroup.org/onlinepubs/009629399/apdxa.htm#tagcjh_20
for the current version, and also see the expired IETF Internet-Draft
http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt for
a version with more informative prose and examples.

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

import socket

from Random import GetRandomBytes


def GenerateUuid():
    """Returns a new UUID as a long int"""
    result = GetRandomBytes(16)
    result = result[:6] + chr((ord(result[6]) & 0x4F) | 0x40) + result[7:8] + chr((ord(result[8]) & 0xBF) | 0x80) + result[9:]

    res = 0L
    for i in range(16):
        res = (res << 8) + ord(result[i] )

    return res


def UuidAsString(uuid):
    """
    Formats a long int representing a UUID as a UUID string:
    32 hex digits in hyphenated groups of 8-4-4-4-12.
    """
    ## Python 2.0+
    s = '%032x' % uuid
    ## Python 1.5+
    #s = string.replace(string.lower('%032s' % hex(uuid)[2:-1]),' ','0')
    return '%s-%s-%s-%s-%s' % (s[0:8],s[8:12],s[12:16],s[16:20],s[20:])

    ## Uche wants to keep this around.
    ## Note that it does not 0-pad the number; this needs to be fixed.
    #newUuid = ''
    #curUuid = uuid
    #for ctr in range(16):
    #    num = int(curUuid & 0xFF)
    #    newChar = chr(num)
    #    curUuid = curUuid >> 8
    #    newUuid = newChar + newUuid
    #
    #uuid = newUuid
    #
    #result = ''
    ##This could of course be a function, but the overhead is undesirable
    #mult = 0x1000000L
    #num = 0
    #ix = 0
    #while mult:
    #    num = num + mult * ord(uuid[ix])
    #    mult = mult / 0x100
    #    ix = ix + 1
    #result = result + hex(num)[2:-1] + '-'
    #mult = 0x100
    #num = 0
    #while mult:
    #    num = num + mult * ord(uuid[ix])
    #    mult = mult / 0x100
    #    ix = ix + 1
    #result = result + hex(num)[2:] + '-'
    #mult = 0x100
    #num = 0
    #while mult:
    #    num = num + mult * ord(uuid[ix])
    #    mult = mult / 0x100
    #    ix = ix + 1
    #result = result + hex(num)[2:] + '-'
    #mult = 0x100
    #num = 0
    #while mult:
    #    num = num + mult * ord(uuid[ix])
    #    mult = mult / 0x100
    #    ix = ix + 1
    #result = result + hex(num)[2:] + '-'
    #mult = 0x1000000L
    #num = 0
    #while mult:
    #    num = num + mult * ord(uuid[ix])
    #    mult = mult / 0x100
    #    ix = ix + 1
    #result = result + hex(num)[2:-1]
    #mult = 0x100
    #num = 0
    #while mult:
    #    num = num + mult * ord(uuid[ix])
    #    mult = mult / 0x100
    #    ix = ix + 1
    #result = result + hex(num)[2:]
    #return result.lower()


def CompareUuids(u1, u2):
    """Compares, as with cmp(), two UUID strings case-insensitively"""
    return cmp(u1.upper(), u2.upper())


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