__init__.py 文件源码

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

项目:king-phisher-plugins 作者: securestate 项目源码 文件源码
def enrollment_remove(self, _):
        rpc = self.application.rpc
        this_user = rpc.remote_table_row('users', rpc.username)
        if this_user.otp_secret is None:
            gui_utilities.show_dialog_info(
                'Not Enrolled',
                self.application.get_active_window(),
                'This account is not currently enrolled in two factor\n'\
                + 'authentication. There are no changes to make.'
            )
            return
        remove = gui_utilities.show_dialog_yes_no(
            'Already Enrolled',
            self.application.get_active_window(),
            'Are you sure you want to unenroll in TOTP? This will remove\n'\
            + 'two factor authentication on your account.'
        )
        if not remove:
            return
        this_user.otp_secret = None
        this_user.commit()
        gui_utilities.show_dialog_info(
            'TOTP Unenrollment',
            self.application.get_active_window(),
            'Successfully removed the TOTP secret. Your account is now unenrolled\n'\
            + 'in two factor authentication. You will no longer be prompted to enter\n'\
            + 'the value when you login.'
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号