Torctl.torutil
마지막 업데이트 :
18 11월 2024
TorCtl.TorUtil |
index /data/users/mikeperry/code/SOAT/torflow-trunk-clean/TorCtl/TorUtil.py |
TorUtil -- Support functions for TorCtl.py and metatroller
Functions |
| |
|
- escape_dots(s, translate_nl=1)
- plog(level, msg)
- quote(s)
- s2k_check(secret, k)
- DOCDOC
- s2k_gen(secret, rng=None)
- DOCDOC
- secret_to_key(secret, s2k_specifier)
- Used to generate a hashed password string. DOCDOC.
- sort_list(list, key)
- Sort a list by a specified key
- unescape_dots(s, translate_nl=1)
- urandom_rng(n)
- Try to read some entropy from the platform entropy source.
- zprob(z)
- Returns the area under the normal curve 'to the left of' the given z value.
Thus,
for z<0, zprob(z) = 1-tail probability
for z>0, 1.0-zprob(z) = 1-tail probability
for any z, 2.0*(1.0-zprob(abs(z))) = 2-tail probability
Adapted from z.c in Gary Perlman's |Stat.
Usage: lzprob(z)
|
Data |
| |
|
__all__ = [‘Enum’, ‘Enum2’, ‘Callable’, ‘sort_list’, ‘quote’, ‘escape_dots’, ‘unescape_dots’, ‘BufSock’, ‘secret_to_key’, ‘urandom_rng’, ‘s2k_gen’, ‘s2k_check’, ‘plog’, ‘ListenSocket’, ‘zprob’, ‘logfile’, ‘loglevel’]
logfile = None
loglevel = ‘DEBUG’ |