controller.py 文件源码

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

项目:ByWaf-RE 作者: depasonico 项目源码 文件源码
def LoadPayloads(self):
        """
        Crawl the module path and load up everything found into self.payloads.
        """

        # crawl up to 5 levels down the module path
        for x in xrange(1,5):
            # make the folder structure the key for the module

            d = dict( (path[path.find("payloads")+9:-3], imp.load_source( "/".join(path.split("/")[3:])[:-3],path )  ) for path in glob.glob(join(settings.BYWAF_PATH+"/modules/payloads/" + "*/" * x,'[!_]*.py')) )

            # instantiate the payload stager
            for name in d.keys():
                module = d[name].Payload()
                self.payloads.append( (name, module) )

        # sort payloads by their key/path name
        self.payloads = sorted(self.payloads, key=lambda x: (x[0]))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号