Keeps pedophiles and CP spammers away from telegram groups by checking if member or media hash is blacklisted.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. 3.8KB

  1. from os.path import isfile
  2. from json import load,dump
  3. def load_json(file):
  4. with open(file,"r") as f:
  5. return load(f)
  6. def dump_json(data,file):
  7. with open(file,"w") as f:
  8. dump(data,f,indent=0)
  9. if not isfile("meta.json"):
  10. dump_json({
  11. "admins":[],
  12. "token" : None,
  13. "banned": 0,
  14. "report_ch": None,
  15. "reported":None
  16. },"meta.json")
  17. for file in ["blacklist.json","filter.json"]:
  18. if not isfile(file):
  19. dump_json([],file)
  20. if not isfile("chats.json"):
  21. dump_json({},"chats.json")
  22. GREETING_MESSAGE = """Welcome to Anti-Pedo bot. This bot protects groups from pedophiles and CP spammers by checking if someone who has joined to your group is blacklisted. It also checks file hashes of medias for known images to avoid CP raids.
  23. Blacklist is based on @Pedo_Hunters_Channel which is a volunteer community dedicated to expose and report child abuse activity on Telegram.
  24. This bot was necessary because as you can also see on Pedo Hunters channel, Telegram is too slow at taking action or sometimes they don't even care since they're busy with banning nationalist channels instead.
  25. <u><b>Who is on the blacklist?</b></u>
  26. Known/reported CP spammers and participants of CP networks.
  27. <u><b>Can i trust this bot with admin permissions?</b></u>
  28. If you give the bot ban and message deletion permissions, it will automatically ban black-listed users and delete detected CP media. If you don't, bot will send a warning private message to moderators of group instead. Also, CP detection by file signature feature won't work if bot is not mod since telegram API limitations. You decide.
  29. <u><b>Can i trust this bot with my privacy?</b></u>
  30. Here is the <a href=''>source code</a> if you're interested. Bot will only log banned users and collect IDs of public chats which bot participating in. Also, bot doesn't have access to members of a group.
  31. <u><b>What is the blacklisting process?</b></u>
  32. You can check exposed users at @Pedo_Hunters_Channel.
  33. - monitor shitposting/borderline chat for red flags
  34. - track suspicious users.
  35. - check if they have actually posted CP, joined explicit pedo groups, associated and defended known pedos, explicitly said to be attracted/have fucked prepubescent kids
  36. - if the evidence is compelling we post it and blacklist the user
  37. <u><b>How trustworthy your blacklist is?</b></u>
  38. We don't blacklist users unless we have concrete evidence. If CP was shared in one of the groups you were participating in that's not your fault. But if CP was regularly shared or neither the mods nor the users took action against the content, continuing to participate is your fault. If you still think you were accidentally added to blacklist contact us using /report command.
  39. <u><b>How can I use this bot?</b></u>
  40. You can add the bot to your group and give it ban permission if you want. Your moderators of group have to start the bot in order to receive PM alert messages. To feedback or report an incident, you can use /report option. To check status of the bot, use /meta command.
  41. <b>SUPPORT US</b>
  42. If you find our work helpful, you can support us to cover hosting expenses and to upgrade the servers trough sending your donations to our monero wallet.
  43. <code>4AQiAtynJkM3qC1SkVdEFjFmmayXv6ou9b7qqpYnfo8934WzYLzZ9RPidgLZ4fjmcMiC3mihcwUN</code>
  44. """
  45. BOT_ADDED_MESSAGE = """ Welcome to Anti-Pedo bot. If you want the bot to detect CP media you have to give him admin previleges since it can't read messages without it because of telegram api limitations, if you don't need this feature you don't need to, it's up to you.
  46. Even though you don't give the bot enough permissions, bot can handle it. When it can't ban users it sends moderators a warning private message instead. Moderators and admins who wants to receive this warning notifications should start pm conversation with bot. """