core.py 文件源码

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

项目:pysploit 作者: spencerdodd 项目源码 文件源码
def load_exploit(self, exploit_to_load):
        """Loads a given exploit to the active session

        Checking for exploit validity happens in this method. The check is a
        dynamic module load from the exploits module dir. If we don't get an
        error, then the exploit exists. If we get an error, the exploit was
        not entered correctly. Accession-by-title.
        """
        #try:
        exploit_module = locate("exploits." + exploit_to_load.strip() + "." + exploit_to_load.strip())
        exploit_instance = exploit_module()
        self.active_session.set_exploit(exploit_instance)
        #except ModuleNotFoundError as mnfe:
        #   print ("{}\n\t[*] Entered: {}".format(INVALID_EXPLOIT_ERROR, exploit_module_name))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号