EnderUNIX Team.


EnderUNIX İpucu

Arkadaşıma gönder , Ana Sayfa

[ Spam ]

"FuzzyOcr Ile Resimli Spamlerin Onlenmesi" - Gökhan ALKAN - (2007-05-09 16:56:05)   [2901]

FuzzyOCR resimli mailleri tarayip icerisinde gecen kelimelere gore puanlayarak resimli spamleri engellemeye yarayan bir yazilim. FreeBSD port agacinda /usr/ports/mail/p5-FuzzyOcr dizininde bulunmaktadir. Bundan once FuzzyOCR icin gerekli yazilimlardan bazilari yuklenecek ardindan fuzyocr yuklenecektir.

# cd /usr/ports/mail/p5-FuzzyOcr
# make install


Kurulumda asagidaki sekilde hata alirsaniz eger bagiimli oldugu paketlerden ImageMagick icin X11 destegi aktif hale getirilmelidir.

...
ImageMagick-nox11-6.3.3.5 SVG support requires X11 libraries, please unset WITHOUT_X11.
*** Error code 1
Stop in /usr/ports/graphics/ImageMagick.
...

ImageMagick FreeBSD port agacinda asagidaki dizinde bulunur. Kurulum icin

# cd /usr/ports/graphics/ImageMagick
# make WITHOUT_X11=yes install


port agacindan kurulumda sorun yasanirsa eger sgv ve wmf destegi kaldirilarak kurulum yapilabilir.

Kurulumun ardindan /usr/local/share/examples/FuzzyOcr dizininde bulunan FuzzyOcr.cf ve FuzzyOcr.words dosyalari /usr/local/etc/mail/spamassassin (port agacindan kuruldugu varsayiliyor)
kopyalanir.

FuzzyOcr calismasi icin FuzzyOcr.cf dosyasinin duzenlenmesi gerekmektedir.

# vi FuzzyOcr.cf
focr_verbose
focr_logfile /var/log/spamd/FuzzyOcr.log
focr_global_wordlist /usr/local/etc/mail/spamassassin/FuzzyOcr.words

focr_bin_giffix /usr/local/bin/giffix
focr_bin_giftext /usr/local/bin/giftext
focr_bin_gifasm /usr/local/bin/gifasm
focr_bin_gifinter /usr/local/bin/gifinter
focr_bin_giftopnm /usr/local/bin/giftopnm
focr_bin_jpegtopnm /usr/local/bin/jpegtopnm
focr_bin_pngtopnm /usr/local/bin/pngtopnm
focr_bin_ppmhist /usr/local/bin/ppmhist
focr_bin_convert /usr/local/bin/convert
focr_bin_identify /usr/local/bin/identify
focr_bin_gocr /usr/local/bin/gocr

#

FuzzyOcr'in log tutmasi icin dosya olusturulmalidir.

# touch /var/log/spamd/FuzzyOcr.log


Spamassassin icin test edilmeli

# spamassassin --lint


Plugini test edilmeli


# spamassassin -t < resimli_mail

pts rule name description
---- ---------------------- --------------------------------------------------
0.1 FORGED_RCVD_HELO Received: contains a forged HELO
3.0 BAYES_80 BODY: Bayesian spam probability is 80 to 95%
[score: 0.8720]
0.4 HTML_30_40 BODY: Message is 30% to 40% HTML
0.0 HTML_MESSAGE BODY: HTML included in message
0.9 MY_CID_AND_CLOSING SARE cid and closing
1.0 SHORT_HELO_AND_INLINE_IMAGE Short HELO string, with inline image
1.5 FUZZY_OCR_WRONG_CTYPE BODY: Mail contains an image with wrong
content-type set
Image has format "GIF" but
content-type is "image/jpeg"
2.5 FUZZY_OCR_CORRUPT_IMG BODY: Mail contains a corrupted image
Corrupt
image: GIF-LIB error: Image is defective,
decoding aborted.
15 FUZZY_OCR BODY: Mail contains an image with common spam text inside
Words found:
"alert" in 2 lines
"alert" in 2
lines
"stock" in 2 lines
"investor" in 1 lines
"company" in 1 lines
"trade" in 1 lines
"target" in 1 lines
"service" in 1 lines
"recommendation" in 1 lines
"meridia" in 1
lines
(13 word occurrences found)

#

Pluginin aktif olabilmesi icin spamassassin yeniden baslatilmalidir.

# /usr/local/etc/rc.d/sa-spamd restart

Arkadaşıma gönder , Ana Sayfa