示例#1
0
def test_disasm_unsupported_target():
    pwny.disasm(b'\x5f', target=target_unknown_32)
示例#2
0
def test_disasm_unsupported_target():
    pwny.disasm(b'\x5f', target=target_unknown_32)
示例#3
0
def test_disasm(test_target, syntax, source, result, target):
    output = pwny.disasm(source, syntax=syntax, target=test_target)
    assert output == [result], 'Got %r, expected %r' % (output, result)
示例#4
0
def test_disasm_unsupported_target():
    pwny.disasm(SOURCE_DISASM, target=target_arm_32)
示例#5
0
def test_disasm(test_target, syntax, source, result, target):
    output = pwny.disasm(source, syntax=syntax, target=test_target)
    assert output == [result], 'Got %r, expected %r' % (output, result)
示例#6
0
def test_disasm_with_target_x86_32():
    assert pwny.disasm(SOURCE_DISASM, target=target_x86_32) == RESULT_DISASM_32
示例#7
0
def test_disasm_with_target_x86_64():
    print(RESULT_DISASM_64, pwny.disasm(SOURCE_DISASM, target=target_x86_64))
    assert pwny.disasm(SOURCE_DISASM, target=target_x86_64) == RESULT_DISASM_64
示例#8
0
def test_disasm_with_default_target():
    # Note: set up sets default arch to x86 32bit
    assert pwny.disasm(SOURCE_DISASM) == RESULT_DISASM_32
示例#9
0
def test_disasm_unsupported_target():
    pwny.disasm(SOURCE_DISASM, target=target_arm_32)
示例#10
0
def test_disasm_with_target_x86_64():
    print(RESULT_DISASM_64, pwny.disasm(SOURCE_DISASM, target=target_x86_64))
    assert pwny.disasm(SOURCE_DISASM, target=target_x86_64) == RESULT_DISASM_64
示例#11
0
def test_disasm_with_target_x86_32():
    assert pwny.disasm(SOURCE_DISASM, target=target_x86_32) == RESULT_DISASM_32
示例#12
0
def test_disasm_with_default_target():
    # Note: set up sets default arch to x86 32bit
    assert pwny.disasm(SOURCE_DISASM) == RESULT_DISASM_32