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

これに関して進展はありましたか?

私たちのコミュニティでは、1日に数件のスパム/ボットアカウントが登録されていますが、投稿の閲覧数は0、トピックの閲覧数は0、読書時間は1分未満です。特定のパラメータを持つすべてのアカウントを自動削除する機能があると良いでしょう。

また、ボットをフィルタリングするのに役立つキャプチャまたは同様のプラグインのオプションはありますか?

それらのアカウントにアクティビティがない場合、無害です。他のユーザー(公開ユーザーリストを含む)からは見えません。また、信頼レベルに関係なく、ユーザープロフィールはrobots.txtで禁止されており、検索エンジンにも表示されません。

さらに、非アクティブなアカウントは定期的にクリーンアップされます。「非アクティブなユーザーを日数後にクリーンアップ」設定を参照してください(「非アクティブなユーザー(投稿のない信頼レベル0)が削除されるまでの日数。クリーンアップを無効にするには0に設定します。」)。

これは CleanUpInactiveUsers SideKiq ジョブによってトリガーされます。

「いいね!」 1

それは何も禁止しません。robots.txtは単なる丁寧な提案であり、同時に正しい方向を示しています。

それが無害なものではないかもしれませんが、過去にはスパマーがこれらのアカウントを使用して、プロファイルを「エイジング」してからアクティブ化していました。これは、私たちが新しいアカウントに注目していることを知っていたからです。その後、突然3か月前のアカウントが、スパムやDMユーザーのフィッシング詐欺にリンクしようとします。

個人的には、問題になるのを待つのではなく、それらを事前に防ぐためのより良いツールが欲しいです。また、そもそもボットがサインアップするのを防ぐためのより強力なツールがあれば役立ちます。

はい、時々問題になることもあります。私は多くのスパムを経験しますが、今のところ、長期間投稿がなかったアカウントが突然スパムを投稿するのを見たことはありません。

もしスパムを投稿すれば、いずれにしても他のユーザーによってすぐにフラグが立てられるでしょう。

そして、非アクティブなアカウントが削除されるまでの期間を大幅に短縮することもできます。