⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 t.bogoutil

📁 一个C语言写的快速贝叶斯垃圾邮件过滤工具
💻 BOGOUTIL
字号:
#! /bin/sh -x. ${srcdir:=.}/t.frame## test common bogoutil functions## initializerm ${TMPDIR}/* # reset TXN detectionif [ $DB_TXN = true ] ; then addarg=--db-transaction=yes ; else addarg= ; fiecho bacon on toast | $BOGOFILTER -C -d ${TMPDIR} -n $addargecho foul eggs      | $BOGOFILTER -C -d ${TMPDIR} -s $addarg# see that these do not crash$BOGOUTIL -C -v -V > /dev/null$BOGOUTIL -C -h    > /dev/null# check if bogoutil can count ;-)cat <<_EOF >${TMPDIR}/ref7 tokens dumped_EOF$BOGOUTIL -C -v -d ${WORDLIST} -D | tail -1 > ${TMPDIR}/outcmp -s ${TMPDIR}/out ${TMPDIR}/ref# ROBX calculation cannot work, insufficient dataif $BOGOUTIL -C -r ${WORDLIST} ; then false ; fiif $BOGOUTIL -C -R ${WORDLIST} ; then false ; fi# load more data as ROBX fodder$BOGOFILTER -xd -C -n -d ${TMPDIR} -M -B ${srcdir}/inputs/good.mbx$BOGOFILTER -xd -C -s -d ${TMPDIR} -M -B ${srcdir}/inputs/spam.mbx# printing robx must not store the token$BOGOUTIL -C -r ${WORDLIST} | egrep '^ ?0?.[0-9]+$' >/dev/nullif $BOGOUTIL -C -w ${WORDLIST} .ROBX | egrep '^[[:alnum:]]' ; then    falsefi# storing robx must store the token, quite obviously :-)# also use -p so we test both -p and -w$BOGOUTIL -C -R ${WORDLIST}$BOGOUTIL -C -p ${WORDLIST} .ROBX | egrep '^\.ROBX' >/dev/null# check if it can dump tokens from stdinecho "head:toast" | $BOGOUTIL -C -p ${WORDLIST} \| egrep '^head:toast' >/dev/nullif [ $DB_TYPE = db ] || [ $DB_TYPE = sqlite ] ; then    ps=`$BOGOUTIL -C --db-print-pagesize ${WORDLIST}`    test -n "$ps"    test "$ps" != UNKNOWNfiif [ $DB_TYPE = db ] ; then    $BOGOUTIL -C --db-verify ${WORDLIST}    pc=`$BOGOUTIL -C --db-print-leafpage-count ${WORDLIST}`    test "$pc" != ""    test "$pc" != "UNKNOWN"    test "$pc" != "0"    if [ $DB_TXN = true ] ; then	$BOGOUTIL -C --db-recover ${TMPDIR}/	$BOGOUTIL -C --db-checkpoint ${TMPDIR}/	if ls "${TMPDIR}/log."* >/dev/null 2>&1 ; then	    $BOGOUTIL -C --db-prune ${TMPDIR}/	    ls ${TMPDIR}/log.* >${TMPDIR}/logs.1	    $BOGOUTIL -C --db-list-logfiles "${TMPDIR}" all >"${TMPDIR}/logs.2"	    cmp ${TMPDIR}/logs.1 ${TMPDIR}/logs.2	fi	if ls "${TMPDIR}/__db."* >/dev/null 2>&1 ; then	    $BOGOUTIL -C --db-remove-environment ${TMPDIR}/	    if ls "${TMPDIR}/__db."* >/dev/null 2>&1 ; then		false	    fi	fi    fifi#test with wordlist in current directoryBOGOUTIL="$VAL `pwd`/${relpath}/bogoutil$EXE_EXT"WORDLIST="wordlist.${DB_EXT}"OPC=$PRINTCOREcase $srcdir in    /*)	PRINTCORE=${srcdir}/$INSERT/printcore ;;    *)	PRINTCORE=`pwd`/$srcdir/$INSERT/printcore ;;esacunset BOGOFILTER_DIRcd ${TMPDIR}$BOGOUTIL -C -w $WORDLIST .MSG_COUNT >/dev/null$BOGOUTIL -C -p $WORDLIST .MSG_COUNT >/dev/nullPRINTCORE=$OPCcd - >/dev/null

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -