logger.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:Remote-Integrity-Tool 作者: DearBytes 项目源码 文件源码
def dispatch_telegram_msg(self, events):
        """
        Dispatch a telegram push message
        :param events: List of events that were found
        :type events: dict[models.Event]
        :return: None
        """
        if not any(events):
            return print("[-] No events detected, skipping telegram push notification.")

        if not self.config.telegram_api_token:
            return print("[-] No telegram api token configured, skipping push notification.")

        if not self.config.telegram_api_chat_id:
            return print("[-] No telegram chat id configured, skipping push notification.")

        bot = Updater(token=self.config.telegram_api_token).bot
        bot.sendMessage(chat_id=self.config.telegram_api_chat_id, text=self._get_email_body_from_events(events))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号