403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/twisted/python/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/python/randbytes.pyc
ó
[³XMc@s¯dZddlZddlZddlZeeddƒZdefd„ƒYZdefd„ƒYZ	de
fd	„ƒYZeƒZej
Z
ejZ[d
ddgZdS(sQ
Cryptographically secure random implementation, with fallback on normal random.
iÿÿÿÿNtgetrandbitstSecureRandomNotAvailablecBseZdZRS(sD
    Exception raised when no secure random algorithm is found.
    (t__name__t
__module__t__doc__(((s</usr/lib/python2.7/dist-packages/twisted/python/randbytes.pyRstSourceNotAvailablecBseZdZRS(sQ
    Internal exception used when a specific random source is not available.
    (RRR(((s</usr/lib/python2.7/dist-packages/twisted/python/randbytes.pyRst
RandomFactorycBsSeZdZdZeZd„Zd„Zed„Zd„Z	d„Z
d„ZRS(	sy
    Factory providing L{secureRandom} and L{insecureRandom} methods.

    You shouldn't have to instantiate this class, use the module level
    functions instead: it is an implementation detail and could be removed or
    changed arbitrarily.

    @cvar randomSources: list of file sources used when os.urandom is not
        available.
    @type randomSources: C{tuple}
    s/dev/urandomcCs=ytj|ƒSWn%ttfk
r8}t|ƒ‚nXdS(sO
        Wrapper around C{os.urandom} that cleanly manage its absence.
        N(tosturandomtAttributeErrortNotImplementedErrorR(tselftnbyteste((s</usr/lib/python2.7/dist-packages/twisted/python/randbytes.pyt
_osUrandom-scCsxx[|jD]P}yt|dƒ}Wnttfk
r<q
X|j|ƒ}|jƒ|Sq
Wtd|jfƒ‚dS(sœ
        Wrapper around random file sources.

        This method isn't meant to be call out of the class and could be
        removed arbitrarily.
        trbsFile sources not available: %sN(t
randomSourcestfiletIOErrortOSErrortreadtcloseR(RRtsrctftbytes((s</usr/lib/python2.7/dist-packages/twisted/python/randbytes.pyt_fileUrandom7s
cCsxx9d	D]1}yt||ƒ|ƒSWqtk
r7qXqW|rhtjddtddƒ|j|ƒStdƒ‚dS(
sk
        Return a number of secure random bytes.

        @param nbytes: number of bytes to generate.
        @type nbytes: C{int}
        @param fallback: Whether the function should fallback on non-secure
            random or not.  Default to C{False}.
        @type fallback: C{bool}

        @return: a string of random bytes.
        @rtype: C{str}
        RRsPurandom unavailable - proceeding with non-cryptographically secure random sourcetcategoryt
stacklevelis!No secure random source availableN(s
_osUrandoms_fileUrandom(tgetattrRtwarningstwarntRuntimeWarningtinsecureRandomR(RRtfallbackR((s</usr/lib/python2.7/dist-packages/twisted/python/randbytes.pytsecureRandomKs



cCsQ|jdk	rA|j|dƒ}d|d|}|jdƒStdƒ‚dS(s3
        Wrapper around C{os.getrandbits}.
        is%%0%dxithexs#random.getrandbits is not availableN(RtNonetdecodeR(RRtnthexBytes((s</usr/lib/python2.7/dist-packages/twisted/python/randbytes.pyt	_randBitshs

cCs=d}x0t|ƒD]"}|ttjddƒƒ7}qW|S(s5
        Wrapper around C{random.randrange}.
        tiiÿ(txrangetchrtrandomt	randrange(RRRti((s</usr/lib/python2.7/dist-packages/twisted/python/randbytes.pyt
_randRangess cCs@x9dD]1}yt||ƒ|ƒSWqtk
r7qXqWdS(sÒ
        Return a number of non secure random bytes.

        @param nbytes: number of bytes to generate.
        @type nbytes: C{int}

        @return: a string of random bytes.
        @rtype: C{str}
        R(R/N(s	_randBitss
_randRange(RR(RRR((s</usr/lib/python2.7/dist-packages/twisted/python/randbytes.pyR }s



(s/dev/urandom(RRRRRRRtFalseR"R(R/R (((s</usr/lib/python2.7/dist-packages/twisted/python/randbytes.pyRs	
			
R"R (RRRR,RR$RtRuntimeErrorRRtobjectRtfactoryR"R t__all__(((s</usr/lib/python2.7/dist-packages/twisted/python/randbytes.pyt<module>s$r			

Youez - 2016 - github.com/yon3zu
LinuXploit