X7ROOT File Manager
Current Path:
/lib64/python2.7/Demo/pdist
lib64
/
python2.7
/
Demo
/
pdist
/
??
..
??
FSProxy.py
(7.64 KB)
??
FSProxy.pyc
(12.5 KB)
??
FSProxy.pyo
(12.5 KB)
??
RCSProxy.py
(4.61 KB)
??
RCSProxy.pyc
(7.57 KB)
??
RCSProxy.pyo
(7.57 KB)
??
README
(4.16 KB)
??
client.py
(4.6 KB)
??
client.pyc
(6.57 KB)
??
client.pyo
(6.57 KB)
??
cmdfw.py
(4.53 KB)
??
cmdfw.pyc
(5.12 KB)
??
cmdfw.pyo
(5.12 KB)
??
cmptree.py
(5.64 KB)
??
cmptree.pyc
(5.98 KB)
??
cmptree.pyo
(5.98 KB)
??
cvslib.py
(9.94 KB)
??
cvslib.pyc
(12.83 KB)
??
cvslib.pyo
(12.83 KB)
??
cvslock.py
(6.61 KB)
??
cvslock.pyc
(8.36 KB)
??
cvslock.pyo
(8.36 KB)
??
mac.py
(352 B)
??
mac.pyc
(598 B)
??
mac.pyo
(598 B)
??
makechangelog.py
(2.92 KB)
??
makechangelog.pyc
(3.05 KB)
??
makechangelog.pyo
(3.05 KB)
??
rcsbump
(745 B)
??
rcsclient.py
(1.76 KB)
??
rcsclient.pyc
(2.05 KB)
??
rcsclient.pyo
(2.05 KB)
??
rcslib.py
(10.08 KB)
??
rcslib.pyc
(11.28 KB)
??
rcslib.pyo
(11.28 KB)
??
rcvs
(117 B)
??
rcvs.py
(13.32 KB)
??
rcvs.pyc
(14.08 KB)
??
rcvs.pyo
(14.08 KB)
??
rrcs
(117 B)
??
rrcs.py
(3.9 KB)
??
rrcs.pyc
(5.5 KB)
??
rrcs.pyo
(5.5 KB)
??
security.py
(1.07 KB)
??
security.pyc
(1.64 KB)
??
security.pyo
(1.64 KB)
??
server.py
(4.47 KB)
??
server.pyc
(5.83 KB)
??
server.pyo
(5.83 KB)
??
sumtree.py
(518 B)
??
sumtree.pyc
(903 B)
??
sumtree.pyo
(903 B)
Editing: security.py
class Security: def __init__(self): import os env = os.environ if env.has_key('PYTHON_KEYFILE'): keyfile = env['PYTHON_KEYFILE'] else: keyfile = '.python_keyfile' if env.has_key('HOME'): keyfile = os.path.join(env['HOME'], keyfile) if not os.path.exists(keyfile): import sys for dir in sys.path: kf = os.path.join(dir, keyfile) if os.path.exists(kf): keyfile = kf break try: self._key = eval(open(keyfile).readline()) except IOError: raise IOError, "python keyfile %s: cannot open" % keyfile def _generate_challenge(self): import random return random.randint(100, 100000) def _compare_challenge_response(self, challenge, response): return self._encode_challenge(challenge) == response def _encode_challenge(self, challenge): p, m = self._key return pow(long(challenge), p, m)
Upload File
Create Folder