当前位置: 首页>>代码示例>>Python>>正文


Python PYLOAD.generateAndAddPackages方法代码示例

本文整理汇总了Python中module.webui.PYLOAD.generateAndAddPackages方法的典型用法代码示例。如果您正苦于以下问题:Python PYLOAD.generateAndAddPackages方法的具体用法?Python PYLOAD.generateAndAddPackages怎么用?Python PYLOAD.generateAndAddPackages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在module.webui.PYLOAD的用法示例。


在下文中一共展示了PYLOAD.generateAndAddPackages方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: add

# 需要导入模块: from module.webui import PYLOAD [as 别名]
# 或者: from module.webui.PYLOAD import generateAndAddPackages [as 别名]
def add(request):
    package = request.POST.get('referer', None)
    urls = filter(lambda x: x != "", request.POST['urls'].split("\n"))

    if package:
        PYLOAD.addPackage(package, urls, 0)
    else:
        PYLOAD.generateAndAddPackages(urls, 0)

    return ""
开发者ID:FedeG,项目名称:pyload,代码行数:12,代码来源:cnl.py

示例2: flashgot

# 需要导入模块: from module.webui import PYLOAD [as 别名]
# 或者: from module.webui.PYLOAD import generateAndAddPackages [as 别名]
def flashgot():
    if request.environ['HTTP_REFERER'] != "http://localhost:9666/flashgot" and \
                    request.environ['HTTP_REFERER'] != "http://127.0.0.1:9666/flashgot":
        return HTTPError()

    autostart = int(request.forms.get('autostart', 0))
    package = request.forms.get('package', None)
    urls = filter(lambda x: x != "", request.forms['urls'].split("\n"))
    folder = request.forms.get('dir', None)

    if package:
        PYLOAD.addPackage(package, urls, autostart)
    else:
        PYLOAD.generateAndAddPackages(urls, autostart)

    return ""
开发者ID:FedeG,项目名称:pyload,代码行数:18,代码来源:cnl.py

示例3: addcrypted2

# 需要导入模块: from module.webui import PYLOAD [as 别名]
# 或者: from module.webui.PYLOAD import generateAndAddPackages [as 别名]
def addcrypted2():
    package = request.forms.get("source", None)
    crypted = request.forms["crypted"]
    jk = request.forms["jk"]

    crypted = standard_b64decode(unquote(crypted.replace(" ", "+")))
    if JS:
        jk = "%s f()" % jk
        jk = JS.eval(jk)

    else:
        try:
            jk = re.findall(r"return ('|\")(.+)('|\")", jk)[0][1]
        except Exception:
            # Test for some known js functions to decode
            if jk.find("dec") > -1 and jk.find("org") > -1:
                org = re.findall(r"var org = ('|\")([^\"']+)", jk)[0][1]
                jk = list(org)
                jk.reverse()
                jk = "".join(jk)
            else:
                print "Could not decrypt key, please install py-spidermonkey or ossp-js"

    try:
        Key = unhexlify(jk)
    except Exception:
        print "Could not decrypt key, please install py-spidermonkey or ossp-js"
        return "failed"

    IV = Key

    obj = AES.new(Key, AES.MODE_CBC, IV)
    result = obj.decrypt(crypted).replace("\x00", "").replace("\r", "").split("\n")

    result = filter(lambda x: x != "", result)

    try:
        if package:
            PYLOAD.addPackage(package, result, 0)
        else:
            PYLOAD.generateAndAddPackages(result, 0)
    except Exception:
        return "failed can't add"
    else:
        return "success\r\n"
开发者ID:FedeG,项目名称:pyload,代码行数:47,代码来源:cnl.py


注:本文中的module.webui.PYLOAD.generateAndAddPackages方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。