Spam account scanner script

https://github.com/TannerFilip/discourse-spam-check

I’ll start off by saying, I’m not a great programmer. This is the first “real” tool I’ve written that’s (potentially) useful to people other than me. I’d love any feedback/criticism you have.

I’ve written a Python script that scans through the list of suspect and/or silenced users and lets you delete them if necessary. I ran it over on Mozilla’s Discourse and deleted a few dozen accounts - this was only after I deleted close to a hundred by hand.

There are a few things that seem pretty hacky, especially lines 174 to 191. As I said, I’d appreciate any feedback you might have, and would be happy to answer any questions!

11 إعجابًا

Very cool! One thing you’ll want to do is be sure Akismet is enabled, as we recently (within the last 2-3 months) added a feature where the Akismet plugin will scan new user accounts for spammy stuff and flag them for you thanks to @Roman :clap:

Yes, completely human spam account signups – accounts that never post once, just set up an account with profile info and walk away forever – is indeed still a problem. The below is even after Akismet checking:

But bear in mind user profiles aren’t indexed at all, and new user profiles have seriously suppressed info… and our Akismet change helps tremendously.

Having a cleanup tool is still needed though!

7 إعجابات

I didn’t know that! I’ll have to talk to @LeoMcA to see if we want to enable that.

4 إعجابات

Suspect users are now being sent to the Review Queue, which removed the suspect users list this script was using. As they’re being pushed to manual review, is this needed now?

3 إعجابات

هل كان هناك أي تقدم في هذا؟

يشهد مجتمعنا العديد من عمليات تسجيل الحسابات العشوائية/الآلية يوميًا والتي لديها 0 مشاركة مقروءة، و 0 موضوع تمت مشاهدته، ووقت قراءة أقل من دقيقة واحدة. سيكون من الجيد وجود وظيفة إزالة تلقائية لجميع الحسابات ذات معلمات محددة.

أيضًا، هل هناك خيار لمكون إضافي مثل Captcha أو ما شابه للمساعدة في تصفية الروبوتات؟

إذا لم يكن لتلك الحسابات أي نشاط، فهي غير ضارة. إنها غير مرئية للمستخدمين الآخرين (بما في ذلك قائمة المستخدمين العامة). وملفات تعريف المستخدمين، بغض النظر عن مستوى الثقة الخاص بهم، محظورة في robots.txt وغير مرئية في محركات البحث.

بالإضافة إلى ذلك، يتم تنظيف الحسابات غير النشطة بشكل دوري، راجع إعداد تنظيف المستخدمين غير النشطين بعد أيام (“عدد الأيام قبل إزالة المستخدم غير النشط (مستوى الثقة 0 بدون أي مشاركات). لتعطيل التنظيف اضبطه على 0.”).

يتم تشغيله بواسطة مهمة SideKiq CleanUpInactiveUsers.

إعجاب واحد (1)

هذا لا يحظر شيئًا. ملف robots.txt هو مجرد اقتراح مهذب، وفي نفس الوقت يشير إلى الاتجاه الصحيح.

قد يكون الأمر غير ضار، ولكن في الماضي، استخدم المحتالون هذه الحسابات لـ “تعتيق” ملفاتهم الشخصية قبل تفعيلها، مع العلم أننا نراقب الحسابات الجديدة. ثم فجأة يبدأ حساب عمره 3 أشهر في محاولة الربط بأي محاولات تصيد احتيالي أو رسائل مباشرة للمستخدمين.

شخصيًا، أود أدوات أفضل لمعالجة هذه الأمور قبل أن تصبح مشكلة بدلاً من الانتظار. سيكون من المفيد أيضًا لو كانت لدينا أدوات أقوى لمنع الروبوتات من التسجيل في المقام الأول.

بالتأكيد، قد لا يزال الأمر يمثل مشكلة في بعض الأحيان. أواجه الكثير من البريد العشوائي ولكن حتى الآن لم أر أي حسابات بريد عشوائي تنشر فجأة بعد فترة طويلة.

إذا نشروا بريدًا عشوائيًا، فسيتم تمييزهم بسرعة من قبل المستخدمين الآخرين على أي حال.

ولا يزال بإمكانك تقليل المدة التي يتم بعدها حذف الحساب غير النشط بشكل كبير.