Deprecated: Creation of dynamic property CF\WordPress\DataStore::$logger is deprecated in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php on line 23

Deprecated: Creation of dynamic property CF\WordPress\Proxy::$pluginAPI is deprecated in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/Proxy.php on line 31

Deprecated: Creation of dynamic property SyntaxHighlighter::$brush_names is deprecated in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/syntaxhighlighter/syntaxhighlighter.php on line 248

Deprecated: Creation of dynamic property SyntaxHighlighter::$specialchars is deprecated in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/syntaxhighlighter/syntaxhighlighter.php on line 326
המכללה | הבוט של הספאם ינצח
Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

הבוט של הספאם ינצח

את קאפצ'ת ה"יודע חשבון" של סטיבן הרוד תרגמתי לעברית לפני כמעט שנה. אחרי ששרון התלוננה שהבוטים למדו כבר חשבון, החלטתי לשדרג קצת את המנגנון ולהמיר את הספרות בטקסט. השילוב של פעולה חשבונית + תרגום + המרה מטקסט לספרות – נראה לי כמו מנגנון מנצח שבוט רגיל לא יוכל לו. וזה עבד, ברגע שהופעלה הקאפצ'ה תגובות הספאם הפסיקו להגיע, לפעמים הסתננה לה אחת או שתיים, אבל על תקופה של שבוע שבועיים זה בהחלט היה נסבל.

היה זה עומרי שהצביע על הבעיה העיקרית במנגנון ה"מתוחכם" הזה – מי ששגה בחשבון או התעלם מהשאלה קיבל הודעה שאומרת שהוא שגה, אך לחיצה על חזור לא השיבה את חלונית התגובה עם הטקסט המקורי. וכך קצת אחרי שהמנגנון עלה הוא הוסר כלאחר כבוד ונשמר בצד למקרה של מתקפות ספאם עצבניות (שכמובן הגיעו מדי פעם).

לפני כחודשיים, איתר את בלוגי ספאמר סאנדרה הנורא (ספאמר שכל התגובות שלו מאופיינות בשם שולח xx-Sandra כאשר xx מתחלף בצמד אותיות רנדומאלי). למשך מספר ימים העלתי שוב את מנגנון הקאפצ'ה מתוך מחשבה שהנה הוא יראה שהוא לא מצליח לפרסם הודעות ויעזוב.
אחרי כמה ימים, באותו הרגע שבה הקאפצ'ה ירדה חזרו התגובות של הספאמר להופיע בקצב של 2-3 בדקה, כמעט ללא הפסקה. באותו רגע הופעלה שוב הקאפצ'ה ומאז פעם בכמה חזר הריטואל בו אני מסיר את המנגנון, הספאמר חוזר, אני מחזיר את המנגנון.

וזה לא שלא מותקן לי אקיזמנט, ולזכותו של אקיזמנט יאמר שהספאמר הזה מגיע בפעם אחר פעם לתיבת התגובות החסומות ואף אחת מהן לא הופכת בטעות להיות תגובה הממתינה לאישור. אבל, גם האקיזמנט לפעמים חוסם גם תגובות לגיטימיות ודי מבעס לעבור על 300 תגובות כל יום, רק כדי לוודא שלא השתרבבה פנימה תגובה לגיטימית שכזו.

וככה, תוסף המבחן בחשבון רץ לו ימים כלילות עושה עבודתו נאמנה והנה, לפני כמה ימים החלטתי לנצל קצת זמן פנוי ולהמיר את דף ה-אוף אתה לא יודע את התשובה שהכיל את מחרוזת הטקסט בלבד באיזשהו דף שיכיל גם את התוכן של ההודעה ואפשרות לאשר ידנית הודעה. לקח לי קצת זמן נבירה בקוד עד שחשבתי שמצאתי את המשתנים הנכונים, אבל בכל פעם קיבלתי שדות ריקים במקום מחרוזות הטקסט שניסיתי להעביר.
לקח לי עוד קצת זמן של נבירה בפונקציות, עד שהבנתי איפה הייתה הטעות שלי (או שמא של בונה הקאפצ'ה המקורי).
במקום לבנות את הקאפצ'ה כך שהפונקציה תבדוק אם הערך בשדה תקין ורק אם הוא כזה תאפשר את פירסום התגובה, הקאפצ'ה הזו עבדה בדיוק הפוך – היא איפשרה את פירסום התגובה ואז, אם הערך היה שגוי היא פשוט מחקה אותה ממסד הנתונים.

התוצאה הסופית, ניתן להגיד, היא זהה – הבוט לא ענה על השאלה נכונה ולכן התגובה לא התפרסמה. אך הבעיה היא, שכל ניסיון כזה מבחינת הבוט הוא ניסיון מוצלח שבסופו התגובה התפרסמה (הוא לא מודע למחיקה שלה ממסד הנתונים) וכך, הבלוג מקבל את החותמת "פראייר" והבוט ממשיך להפגיז אותו בלי סוף. למעשה, כל זמן שהתוסף פעיל כל התגובות שלו נמחקות, אבל בין אם אסיר את התוסף ובין אם אשאיר אותו, הוא ממשיך לפנות ולהפגיז את מסד הנתונים שלי. כך, תקעתי את עצמי במעין סוג של לולאה בה אני משתמש בתוסף חוסם תגובות שפוגע בי, אך שגם הסרה שלו תפגע בי.

נראה לי שאסיר את התוסף ואנסה לראות אם אפשר לפלח את כתובות ה IP מהן הוא מגיע ולחסום אותן ישירות. עד אז, נקווה שהוא יתקיף ברגוע.

לדרג את הפוסט
4.3

Posted

in

,

by

Comments

2 תגובות על “הבוט של הספאם ינצח”

  1. תמונת פרופיל של יהונתן

    עשוי להיות פתרון מאוד פשוט:

    דמיין שאתה יכול למצוא את כל מי שענה לא נכונה, לתת לו Timeout של 3601 מילי-שניות, ואחרי זה להפנות אותו לשאלה שוב, מה הספאמר יחשוב? (הוא יתקע בלופ אינסופי ויעמיס על המערכת שלו)

  2. תמונת פרופיל של עמרי

    עדיין לא עובד לדעתי. ניסיתי לא להכניס תשובה לשאלה וזה השמיד את התגובה שהכנסתי.

    בלי קשר, ניסית את Spam karma 2?

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *


Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79

Warning: Cannot modify header information - headers already sent by (output started at /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/DataStore.php:23) in /home/nitzan_n2b/n2b.org/wordpress/wp-content/plugins/cloudflare/src/WordPress/HTTP2ServerPush.php on line 79