Exemplo n.º 1
0
    def mount_multifile(self):
        mf = Multifile()
        mf.open_read(Filename.from_os_specific('phase_1.ef'))
        mf.set_encryption_flag(True)
        mf.set_encryption_password(self.PW)

        if not VirtualFileSystem.get_global_ptr().mount(mf, Filename('/'), 0):
            raise Exception('Multifile could not be mounted.')
Exemplo n.º 2
0
def test_multifile_read_empty():
    stream = StringStream(b'pmf\x00\n\r\x01\x00\x01\x00\x01\x00\x00\x00\xdb\x9d7\\\x00\x00\x00\x00')
    wrapper = IStreamWrapper(stream)

    m = Multifile()
    assert m.open_read(wrapper)
    assert m.is_read_valid()
    assert m.get_num_subfiles() == 0
    m.close()
Exemplo n.º 3
0
def test_multifile_read_empty():
    stream = StringStream(
        b'pmf\x00\n\r\x01\x00\x01\x00\x01\x00\x00\x00\xdb\x9d7\\\x00\x00\x00\x00'
    )
    wrapper = IStreamWrapper(stream)

    m = Multifile()
    assert m.open_read(wrapper)
    assert m.is_read_valid()
    assert m.get_num_subfiles() == 0
    m.close()