예제 #1
0
def test_unpack_invalid_endian():
    pwny.unpack('I', 'AAAA', endian='invalid')
예제 #2
0
def test_unpack_explicit_endian():
    assert pwny.unpack('I', b'ABCD',
                       endian=pwny.Target.Endian.big) == (0x41424344, )
예제 #3
0
def test_unpack_explicit_target():
    assert pwny.unpack('I', b'ABCD',
                       target=target_big_endian) == (0x41424344, )
예제 #4
0
def test_unpack():
    assert pwny.unpack('I', b'DCBA') == (0x41424344, )
예제 #5
0
def test_unpack_format_with_endian():
    assert pwny.unpack('>I', b'ABCD') == (0x41424344, )
예제 #6
0
def test_unpack_invalid_endian():
    pwny.unpack('I', 'AAAA', endian='invalid')
예제 #7
0
def test_unpack_explicit_target():
    assert pwny.unpack('I', b'ABCD', target=target_big_endian) == (0x41424344,)
예제 #8
0
def test_unpack_explicit_endian():
    assert pwny.unpack('I', b'ABCD', endian=pwny.Target.Endian.big) == (0x41424344,)
예제 #9
0
def test_unpack_format_with_endian():
    assert pwny.unpack('>I', b'ABCD') == (0x41424344,)
예제 #10
0
def test_unpack():
    assert pwny.unpack('I', b'DCBA') == (0x41424344,)