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
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
def unpack(data, verb, verify=False): return t.unpack(data, verb, zeus, verify)
def unpack(data, verb): return t.unpack(data, verb, zeus)
def unpack(data,verb,verify=False): return t.unpack(data,verb,zeus,verify)
def unpack(data,verb): return t.unpack(data,verb,zeus)
def unpack(data,verb): return t.unpack(data,verb,pz)