èªåã®spamãã£ã«ã¿ãäœã£ãŠããã®ã§ãããæè¿ãæŽã¢ããªã®ã«ãSubjectã«
MIME(ISO-8859-1)ãå©çšãããã®ãå¢ããŠããŸããããã®ãããã§ãSubject
ã§ã®ãã£ã«ã¿ãªã³ã°ãããŸãè¡ããªãããã«ãªããŸãããããã§ãNKF 2.0 ã
ã€ãã£ãŠã¿ãããšæã£ãã®ã§ãããããŸãåäœããŸããã
ãªãã·ã§ã³ã®äžãæ¹ã®åé¡ã ãšã¯æããŸãããã©ãããã°ããŸãè¡ããããã
ãæ¹ã¯ããã²ãšã埡æ瀺é ããããšæããŸãã
â䜿ã£ãŠããNKF
Network Kanji Filter Version 2.0 (2/0301/Shinji Kono)
âformail -x "Subject:" ã®çµæ
=?iso-8859-1?b?U2F2ZSA1MCUgb24gVmlhZ3JhIG9ubGluZSAtIG5vIHByZXNjcmlwdGlvbiByZXF1aXJlZA==?=
âMew ã§ã¿ããšãã®çµæ
>> Subject: Save 50% on Viagra online - no prescription required
â~/.procmailrc ã«æžãããã®
:0
* ?formail -x "Subject:" | nkf -ml | egrep -i "(viagr?|viag?a|via?ra|vi?gra|v?agra|?iagra)"
spam/.
âããâã§èœã¡ãŠãããªãâŠâŠãªãã ããã
In article <m27k3tu...@qed.decode.waseda.ac.jp>, TATSUMI Takeo <tat...@qef.h.kobe-u.ac.jp> writes
> èªåã®spamãã£ã«ã¿ãäœã£ãŠããã®ã§ãããæè¿ãæŽã¢ããªã®ã«ãSubjectã«
> MIME(ISO-8859-1)ãå©çšãããã®ãå¢ããŠããŸããããã®ãããã§ãSubject
> ã§ã®ãã£ã«ã¿ãªã³ã°ãããŸãè¡ããªãããã«ãªããŸãããããã§ãNKF 2.0 ã
> ã€ãã£ãŠã¿ãããšæã£ãã®ã§ãããããŸãåäœããŸããã
8859 ã¯ããããŸãããŸãåããªããšæããŸãããã察åŠããã...
>
> =?iso-8859-1?b?U2F2ZSA1MCUgb24gVmlhZ3JhIG9ubGluZSAtIG5vIHByZXNjcmlwdGlvbiByZXF1aXJlZA==?=
b encoding ã® iso-8859-1 ãã... ããã€ã¯åããªããªãã£ãŠã
ãšã¯ããããããã§åãã¿ããã§ããã
*** nkf.c Sun Sep 28 10:06:27 2003
--- nkf.c.bak Sun Sep 28 10:06:27 2003
***************
*** 2872,2878 ****
(unsigned char *)"\075?EUC-JP?B?",
(unsigned char *)"\075?SHIFT_JIS?B?",
(unsigned char *)"\075?ISO-8859-1?Q?",
- (unsigned char *)"\075?ISO-8859-1?B?",
(unsigned char *)"\075?ISO-2022-JP?B?",
(unsigned char *)"\075?ISO-2022-JP?Q?",
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
--- 2872,2877 ----
***************
*** 2882,2888 ****
};
int mime_encode[] = {
! JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8,
#endif
--- 2881,2887 ----
};
int mime_encode[] = {
! JAPANESE_EUC, SHIFT_JIS,ISO8859_1, X0208, X0201,
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8,
#endif
***************
*** 2890,2896 ****
};
int mime_encode_method[] = {
! 'B', 'B','Q', 'B', 'B', 'Q',
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
'B',
#endif
--- 2889,2895 ----
};
int mime_encode_method[] = {
! 'B', 'B','Q', 'B', 'Q',
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
'B',
#endif
---
Shinji KONO @ Information Engineering, University of the Ryukyus,
PRESTO, Japan Science and Technology Corporation
æ²³éçæ²» @ çç倧åŠå·¥åŠéšæ
å ±å·¥åŠç§,
ç§åŠæè¡æ¯èäºæ¥å£ããããç 究21(æ©èœãšæ§æ)
ããããã°ãæè¿ãsourceforge ã«ãããã ã£ãããšæã£ããããªãã
ãã°ãã©ãã¯ãæºã£ãŠãããª...
https://sourceforge.jp/projects/nkf/
ãªã®ã§ããã¡ãããããããã§ããèŠãŠãªããã fj ã«åºããŠãããæ¹ã
ãããã :-p
ko...@ie.u-ryukyu.ac.jp (Shinji KONO) writes:
> æ²³éçæ²» @ çç倧åŠæ
å ±å·¥åŠã§ãã
ãããããããšãããããŸããããã£ãŠã¿ãŸãã
ïŒãã¶ãããŸããããšæããŸããïŒ
ããããæµ(spammer)ããããããèããŸãããã
TATSUMI Takeo <tat...@qef.h.kobe-u.ac.jp> writes:
> > æ²³éçæ²» @ çç倧åŠæ
å ±å·¥åŠã§ãã
>
> ãããããããšãããããŸããããã£ãŠã¿ãŸãã
> ïŒãã¶ãããŸããããšæããŸããïŒ
FreeBSD ã® /usr/ports/japanese/nkf ã®äžã®ã«åœãŠãããšãããšã
è¡çªå·ãéãããã§ããã®ã§ãããã«å¯Ÿå¿ããããããæçš¿ããŠãããŸãã
ns:/usr/ports/japanese/nkf/work/nkf202(312) diff -C2 /tmp/nkf.c nkf.c
ã®çµæãã§ããã©ã®ãªãã·ã§ã³ã䜿ãã°ããã®ã§ããããïŒ
% nkf -l -m
ããŠãããªã«ãå€ãããªãã®ã§ããâŠ
=?iso-8859-1?b?U2F2ZSA1MCUgb24gVmlhZ3JhIG9ubGluZSAtIG5vIHByZXNjcmlwdGlvbiByZXF1aXJlZA==?=
*** /tmp/nkf.c Thu Oct 2 17:53:10 2003
--- nkf.c Sat Jan 25 09:09:12 2003
***************
*** 2663,2667 ****
(unsigned char *)"\075?SHIFT_JIS?B?",
(unsigned char *)"\075?ISO-8859-1?Q?",
- (unsigned char *)"\075?ISO-8859-1?B?",
(unsigned char *)"\075?ISO-2022-JP?B?",
(unsigned char *)"\075?ISO-2022-JP?Q?",
--- 2663,2666 ----
***************
*** 2673,2677 ****
int mime_encode[] = {
! JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8,
--- 2672,2676 ----
int mime_encode[] = {
! JAPANESE_EUC, SHIFT_JIS,ISO8859_1, X0208, X0201,
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8,
***************
*** 2681,2685 ****
int mime_encode_method[] = {
! 'B', 'B','Q', 'B', 'B', 'Q',
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
'B',
--- 2680,2684 ----
In article <m2k77oa...@qed.decode.waseda.ac.jp>, TATSUMI Takeo <tt...@cc.tuat.ac.jp> writes
> FreeBSD ã® /usr/ports/japanese/nkf ã®äžã®ã«åœãŠãããšãããšã
> è¡çªå·ãéãããã§ããã®ã§ãããã«å¯Ÿå¿ããããããæçš¿ããŠãããŸãã
FreeBSD ã® nkf ã® revision ãå€ããã§ããããsourceforge ã®CVS
ã®ããããªã®ã§ã
> % nkf -l -m
> ããŠãããªã«ãå€ãããªãã®ã§ããâŠ
-l ã¯ãããªãã§ãã-l ã¯äºå®äžåäœããªããšæãã
Network Kanji Filter Version 2.0 (3/0301/Shinji Kono)
ã§ã-m ã¯defaultãªã®ã§ã-m ããããªãã§ãã
% nkf
=?iso-8859-1?b?U2F2ZSA1MCUgb24gVmlhZ3JhIG9ubGluZSAtIG5vIHByZXNjcmlwdGlvbiByZXF1aXJlZA==?=
Save 50% on Viagra online - no prescription required
ã£ãŠãªãããã
http://www.ie.u-ryukyu.ac.jp/%7Ekono/nkf/
ãããã« nkf203.tar ã眮ããŠããã®ã§ãããã䜿ã£ãŠã¿ãŠãã ããã
---
Shinji KONO @ Information Engineering, University of the Ryukyus,
æ²³éçæ²» @ çç倧åŠå·¥åŠéšæ
å ±å·¥åŠç§,
ko...@ie.u-ryukyu.ac.jp (Shinji KONO) writes:
> http://www.ie.u-ryukyu.ac.jp/%7Ekono/nkf/
>
> ãããã« nkf203.tar ã眮ããŠããã®ã§ãããã䜿ã£ãŠã¿ãŠãã ããã
ããŸããããŸãããããããšãããããŸããã
=?us-ascii?B?MyBNZWRzIHlvdSBuZWVkIGZvciBncmVhdCBkZWFsIHR4Zml=?=
ä»æ¥ããããªâã¡ãŒã«ãæ¥ãŠãŸãããããããŒãããã nkf 㧠decode ã§ã
ãªããã®ã§ããããïŒ
> =?us-ascii?B?MyBNZWRzIHlvdSBuZWVkIGZvciBncmVhdCBkZWFsIHR4Zml=?=
> ä»æ¥ããããªâã¡ãŒã«ãæ¥ãŠãŸãããããããŒãããã nkf 㧠decode ã§ã
> ãªããã®ã§ããããïŒ
charset ã iso-2022-jp ã« sed ããªããã§çœ®ãæããŠãã nkf ã«å°ãããã°?
--
æ± ç°ç äº çš²åé§
ååšäœ
ãfj.kanji ãè¿œå ããŸãã
In article <m27k3i8q...@qed.decode.waseda.ac.jp>,
TATSUMI Takeo <tt...@cc.tuat.ac.jp> wrote:
>æ±äº¬èŸ²å·¥å€§åŠã»ç¥æžå€§åŠã®èŸ°å·±ã§ãã
> =?us-ascii?B?MyBNZWRzIHlvdSBuZWVkIGZvciBncmVhdCBkZWFsIHR4Zml=?=
>
>ä»æ¥ããããªâã¡ãŒã«ãæ¥ãŠãŸãããããããŒãããã nkf 㧠decode ã§ã
>ãªããã®ã§ããããïŒ
ããããããNetwork Kanji Filterãã«æŒ¢å以å€ã®ãã®ã® decode
ãæåŸ
ããæ¹ãããããããããªãã§ããããïŒMIME 㯠MIME ã§
decode ããäžã§ããã®åŸ nkf ã«æž¡ãã®ãæ£è§£ãªããããªãããšã
ãåäžæ©èœã® filter ãçµã¿åãããŠçšãããšããã®ã UNIX æµã§
ããããŸãããããMIME ã ãã® decode ãªããŠç°¡åãªã®ã§èª°ãäœ
ã£ãŠãããããªãããããã
ãäžæ¹ãnkf302 ã® source ãèŠãŸããããnkf 㯠nkf 㧠MIME ã®
è©äŸ¡ããããããŠãcharset ãèŠãªãå®è£
ãªã®ã«ã=?...?ãã®å€ã
èŠãŠããããã§ãã
ãäŸãã°ã=?EUC-JP?ãã§ãã£ãŠããMIME decode ã®çµæã EUC-JP
ãšããŠèŠãªããŠã¯ããªãããããªãã§ãããããnkf ç¬èªã®èªåå€
å¥ã®çµæã charset æå®ããåªå
ããŠãããããªæ°ãããŸãã
ãcharset ãèŠãªããã ã£ãããã©ã㪠charset æååã«ã察å¿
ããã°ããèš³ã ããèŠããªãèŠãã§èªåå€å¥ãã charset ãåªå
ãããã¹ãã ãã
ãå°ãªããšãããISO-8859-1ãããUS-ASCIIãã挢åçšã® filter
ã«å»»ããŠã¯ãããŸãããããUS-ASCII ã¯ãŸã ãã ISO-8859-1 ã¯
ãšãããÂŽãçãçšããååãå«ãã®ã§ããã®èŸºãã® code ãå«
ãŸããŠãããš nkf ç¬èªã®èªåå€å¥ã§ã¯æŒ¢åãšèŠãªãããŠããŸãå¯
èœæ§ããããŸãã
ãããšãã=?Shift_JIS?Q?ããã=?EUC-JP?Q?ãã decode åºæ¥ãª
ãä»æ§ãè¯ãå€ããŸãããããã£ãŠã©ããã® RFC ã§çŠæ¢ãããŠã
ããã§ããã£ãïŒ
ãnkf ã¯ç¥å床ã°ããå
è¡ããã°ããã«é床ã«æåŸ
ãããŠããŸã£ãŠ
倧å€ã§ããããã©ãããŒãºã«ã®ã¿å¿ããŠåŸä»ãã§æ©èœãå®è£
ããã®
ã§ã¯ãªããèŠæ Œã«æ²¿ã£ãŠå®è£
ãã¹ããªããããªãã§ããããã
ïŒãsource å
šéšè¿œããŠãèš³ãããªããã©ãUTF-8 察å¿ã察象ãšãª
ïŒã Unicode ã® version ãäžæãªã®ã§ãæ°ããã® Unicode rule
ïŒã«å¯Ÿå¿åºæ¥ãŠããã®ãã©ããçåã§ãã
ïŒãWindows ã¯å®è³ª Unicode 2.x ã®ããã§ãã Mac OS X 蟺ãã
ïŒãš Unicode 3.x ãªã®ã§è²ã
ãšããããã rule ãè¿œå ãããŠã
ïŒãŸãããã
ïŒãSamba-ja 㧠Mac OS X ã®æ¿ç¹ä»ä»®åæåãæ±ããã«èŠåŽãã
ïŒã®ãèšæ¶ã«æ°ãããšããã
--
ããã ããã
In article <bls0pf$8bn$1...@nsvn01.zaq.ne.jp>, shi...@unixusers.net (Takashi SHIRAI) writes
> ããããããNetwork Kanji Filterãã«æŒ¢å以å€ã®ãã®ã® decode
> ãæåŸ
ããæ¹ãããããããããªãã§ããããïŒMIME 㯠MIME ã§
> decode ããäžã§ããã®åŸ nkf ã«æž¡ãã®ãæ£è§£ãªããããªãããšã
ãŸã䟿å©ãåªå ãªã®ã§ã
> ãäžæ¹ãnkf302 ã® source ãèŠãŸããããnkf 㯠nkf 㧠MIME ã®
> è©äŸ¡ããããããŠãcharset ãèŠãªãå®è£
ãªã®ã«ã=?...?ãã®å€ã
> èŠãŠããããã§ãã
èŠãªãã®ã¯ãééã£ãŠããããšãå€ããããã§ãã
> ãcharset ãèŠãªããã ã£ãããã©ã㪠charset æååã«ã察å¿
> ããã°ããèš³ã ããèŠããªãèŠãã§èªåå€å¥ãã charset ãåªå
> ãããã¹ãã ãã
ããããããããããã¢ãŒãããã£ãŠãããããªã
> ãããšãã=?Shift_JIS?Q?ããã=?EUC-JP?Q?ãã decode åºæ¥ãª
> ãä»æ§ãè¯ãå€ããŸãããããã£ãŠã©ããã® RFC ã§çŠæ¢ãããŠã
> ããã§ããã£ãïŒ
確ãbase64ãæšå¥šãããŠããã¯ãã§ãããªããåœæã¯ãå€ãªMIMEã¯
ã¯ãããšãããããªæ¹éã ã£ãã¿ããããã®åæ®ã§ãããã
> ãnkf ã¯ç¥å床ã°ããå
è¡ããã°ããã«é床ã«æåŸ
ãããŠããŸã£ãŠ
> 倧å€ã§ããããã©ãããŒãºã«ã®ã¿å¿ããŠåŸä»ãã§æ©èœãå®è£
ããã®
> ã§ã¯ãªããèŠæ Œã«æ²¿ã£ãŠå®è£
ãã¹ããªããããªãã§ããããã
åã¯ãããŸãããèããŠã¯ããªãã£ãã¿ããã§ãããèŠæ Œã«ãã£ã
ãã®ã欲ãããªã iconv ãšãããããã
> ïŒãsource å
šéšè¿œããŠãèš³ãããªããã©ãUTF-8 察å¿ã察象ãšãª
> ïŒã Unicode ã® version ãäžæãªã®ã§ãæ°ããã® Unicode rule
> ïŒã«å¯Ÿå¿åºæ¥ãŠããã®ãã©ããçåã§ãã
> ïŒãWindows ã¯å®è³ª Unicode 2.x ã®ããã§ãã Mac OS X 蟺ãã
> ïŒãš Unicode 3.x ãªã®ã§è²ã
ãšããããã rule ãè¿œå ãããŠã
> ïŒãŸãããã
> ïŒãSamba-ja 㧠Mac OS X ã®æ¿ç¹ä»ä»®åæåãæ±ããã«èŠåŽãã
> ïŒã®ãèšæ¶ã«æ°ãããšããã
ãã£ããåé¡ããããã§ããã(ãããä»äººäºã ...)
> charset ã iso-2022-jp ã« sed ããªããã§çœ®ãæããŠãã nkf ã«å°ãããã°?
ãšããããããããŠãŸããããªããèšå®ãã¡ã€ã«ãããã£ãã€ã§ãã
:0 f
* ^Subject: =\?us\-ascii\?.*
| sed -f sed.change-enclang
ããããªããŠã¢ãããã¯ãªå¯Ÿå¿âŠã
nkf ãããã§å¯Ÿå¿ããŠäžãããšå¬ããã£ããããŸãã
ç¥æžããæ±äº¬èŸ²å·¥å€§ã«ç§»ã£ãŠããã£ãããšã®äžã€ãããã¯
SPAM ã®çš®é¡ãå šç¶éãïŒ
ãšããããšã§ããç¥æžã«æ¥ãŠã spam ãšãæ¯æ ¡æ©çš²ç°ã«æ¥ãŠãspam ã¯ã
åŸæ¥ã®èªäœãã£ã«ã¿ãŒã§çµæ§èœããŠãŸããã蟲工倧ã«ç§»ã£ãŠããããâŠã
ã©ãããããšãªã®ã ããâŠâŠã