MediaWiki REL1_31
|
Functions | |
gen_captcha (text, fontname, fontsize, file_name) | |
gen_subdir (basedir, md5hash, levels) | |
pick_word (words, blacklist, verbose, nwords, min_length, max_length) | |
read_wordlist (filename) | |
run_in_thread (object) | |
try_pick_word (words, blacklist, verbose, nwords, min_length, max_length) | |
wobbly_copy (src, wob, col, scale, ang) | |
Variables | |
action | |
args | |
blacklist = read_wordlist(opts.blacklist) | |
int | chunks = 1 |
count = opts.count | |
list | data = [] |
default | |
dirs = opts.dirs | |
fill = opts.fill | |
font = opts.font | |
fontsize = opts.font_size | |
help | |
key = opts.key | |
metavar | |
nonalpha = re.compile('[^a-z]') | |
opts | |
output = opts.output | |
p = multiprocessing.Pool(threads); | |
parser = OptionParser() | |
script_dir = os.path.dirname(os.path.realpath(__file__)) | |
threads = opts.threads | |
type | |
verbose = opts.verbose | |
wordlist = opts.wordlist | |
words = None | |
captcha.gen_captcha | ( | text, | |
fontname, | |||
fontsize, | |||
file_name ) |
Generate a captcha image
Definition at line 76 of file captcha.py.
References wobbly_copy().
Referenced by run_in_thread().
captcha.gen_subdir | ( | basedir, | |
md5hash, | |||
levels ) |
Generate a subdirectory path out of the first _levels_ characters of _hash_, and ensure the directories exist under _basedir_.
Definition at line 130 of file captcha.py.
Referenced by run_in_thread().
captcha.pick_word | ( | words, | |
blacklist, | |||
verbose, | |||
nwords, | |||
min_length, | |||
max_length ) |
Definition at line 184 of file captcha.py.
References try_pick_word().
Referenced by run_in_thread().
captcha.read_wordlist | ( | filename | ) |
Definition at line 191 of file captcha.py.
captcha.run_in_thread | ( | object | ) |
Definition at line 197 of file captcha.py.
References gen_captcha(), gen_subdir(), pick_word(), and print.
captcha.try_pick_word | ( | words, | |
blacklist, | |||
verbose, | |||
nwords, | |||
min_length, | |||
max_length ) |
captcha.wobbly_copy | ( | src, | |
wob, | |||
col, | |||
scale, | |||
ang ) |
Definition at line 51 of file captcha.py.
Referenced by gen_captcha().
captcha.action |
Definition at line 229 of file captcha.py.
captcha.args |
Definition at line 244 of file captcha.py.
captcha.blacklist = read_wordlist(opts.blacklist) |
Definition at line 265 of file captcha.py.
tuple captcha.chunks = 1 |
Definition at line 287 of file captcha.py.
captcha.count = opts.count |
Definition at line 266 of file captcha.py.
list captcha.data = [] |
Definition at line 293 of file captcha.py.
captcha.default |
Definition at line 233 of file captcha.py.
captcha.dirs = opts.dirs |
Definition at line 268 of file captcha.py.
captcha.fill = opts.fill |
Definition at line 267 of file captcha.py.
captcha.font = opts.font |
Definition at line 261 of file captcha.py.
captcha.fontsize = opts.font_size |
Definition at line 270 of file captcha.py.
captcha.help |
Definition at line 228 of file captcha.py.
captcha.key = opts.key |
Definition at line 253 of file captcha.py.
captcha.metavar |
Definition at line 228 of file captcha.py.
captcha.nonalpha = re.compile('[^a-z]') |
Definition at line 48 of file captcha.py.
captcha.opts |
Definition at line 244 of file captcha.py.
captcha.output = opts.output |
Definition at line 257 of file captcha.py.
captcha.p = multiprocessing.Pool(threads); |
Definition at line 292 of file captcha.py.
captcha.parser = OptionParser() |
Definition at line 227 of file captcha.py.
captcha.script_dir = os.path.dirname(os.path.realpath(__file__)) |
Definition at line 226 of file captcha.py.
int captcha.threads = opts.threads |
Definition at line 271 of file captcha.py.
captcha.type |
Definition at line 233 of file captcha.py.
captcha.verbose = opts.verbose |
Definition at line 269 of file captcha.py.
captcha.wordlist = opts.wordlist |
Definition at line 247 of file captcha.py.
list captcha.words = None |
Definition at line 276 of file captcha.py.