示例#1
0
文件: chthonic.py 项目: mak/libzpy
def unpack(data, verb, key):
    if key is not None:
        data = aes_decrypt(data, key)

    data = t.unpack(data, verb, chtstruct)

    result = []
    items = data["items"]

    for item in items:
        if item.id == item._cfgids['CFGID_OUTER_PAYLOAD'] and not item.data.startswith("MZ"):
            try:
                nested = unpack(item.data, verb, key)
                result += nested["items"]
            except ValueError:
                nested = unpack(item.data, verb, None)
                result += nested["items"]

        elif item.id == item._cfgids['CFGID_PAYLOAD'] and item.flags & item._flags['ITEMF_IS_PACKED_CONFIG']:
            nested = unpack(item.data, verb, None)
            result += nested["items"]
        elif item.id == item._cfgids['CFGID_INJECTS']:
            nested = unpack(item.data, verb, None)
            result += nested["items"]
        else:
            result.append(item)

    data['items'] = result

    return data
示例#2
0
def unpack(data, verb, key):
    if key is not None:
        data = aes_decrypt(data, key)

    data = t.unpack(data, verb, chtstruct)

    result = []
    items = data["items"]

    for item in items:
        if item.id == item._cfgids[
                'CFGID_OUTER_PAYLOAD'] and not item.data.startswith("MZ"):
            try:
                nested = unpack(item.data, verb, key)
                result += nested["items"]
            except ValueError:
                nested = unpack(item.data, verb, None)
                result += nested["items"]

        elif item.id == item._cfgids[
                'CFGID_PAYLOAD'] and item.flags & item._flags[
                    'ITEMF_IS_PACKED_CONFIG']:
            nested = unpack(item.data, verb, None)
            result += nested["items"]
        elif item.id == item._cfgids['CFGID_INJECTS']:
            nested = unpack(item.data, verb, None)
            result += nested["items"]
        else:
            result.append(item)

    data['items'] = result

    return data
示例#3
0
文件: zeus.py 项目: threathive/libzpy
def unpack(data, verb, verify=False):
    return t.unpack(data, verb, zeus, verify)
示例#4
0
def unpack(data, verb):
    return t.unpack(data, verb, zeus)
示例#5
0
文件: torment.py 项目: mak/libzpy
def unpack(data,verb,verify=False):
    return t.unpack(data,verb,zeus,verify)
示例#6
0
文件: citadel.py 项目: mak/libzpy
def unpack(data,verb):
    return t.unpack(data,verb,zeus)
示例#7
0
def unpack(data,verb):
    return t.unpack(data,verb,pz)