예제 #1
0
파일: json.py 프로젝트: 3DMeny/pyload
def status():
    try:
        status = toDict(PYLOAD.statusServer())
        status['captcha'] = PYLOAD.isCaptchaWaiting()
        return status
    except:
        return HTTPError()
예제 #2
0
def pre_processor():
    s = request.environ.get('beaker.session')
    user = parse_userdata(s)
    perms = parse_permissions(s)
    status = {}
    captcha = False
    update = False
    plugins = False
    if user["is_authenticated"]:
        status = PYLOAD.statusServer()
        info = PYLOAD.getInfoByPlugin("UpdateManager")
        captcha = PYLOAD.isCaptchaWaiting()

        # check if update check is available
        if info:
            if info["pyload"] == "True":
                update = info["version"]
            if info["plugins"] == "True":
                plugins = True

    return {
        "user": user,
        'status': status,
        'captcha': captcha,
        'perms': perms,
        'url': request.url,
        'update': update,
        'plugins': plugins
    }
예제 #3
0
def status():
    try:
        status = toDict(PYLOAD.statusServer())
        status['captcha'] = PYLOAD.isCaptchaWaiting()
        return status
    except:
        return HTTPError()
예제 #4
0
파일: pyload.py 프로젝트: B1GPY/pyload
def pre_processor():
    s = request.environ.get("beaker.session")
    user = parse_userdata(s)
    perms = parse_permissions(s)
    status = {}
    captcha = False
    update = False
    plugins = False
    if user["is_authenticated"]:
        status = PYLOAD.statusServer()
        info = PYLOAD.getInfoByPlugin("UpdateManager")
        captcha = PYLOAD.isCaptchaWaiting()

        # check if update check is available
        if info:
            if info["pyload"] == "True":
                update = info["version"]
            if info["plugins"] == "True":
                plugins = True

    return {
        "user": user,
        "status": status,
        "captcha": captcha,
        "perms": perms,
        "url": request.url,
        "update": update,
        "plugins": plugins,
    }