How to use the qiling.os.posix.syscall function in qiling

To help you get started, we’ve selected a few qiling examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github qilingframework / qiling / tests / test_elf.py View on Github external
def test_syscall_unlink(ql, unlink_pathname, *args):
            target = False
            pathname = ql_read_string(ql, unlink_pathname)

            if pathname == "test_syscall_unlink.txt":
                print("test => unlink(%s)" % (pathname))
                target = True

            syscall.ql_syscall_unlink(ql, unlink_pathname, *args)

            if target:
                real_path = ql_transform_to_real_path(ql, pathname)
                assert os.path.isfile(real_path) == False
github qilingframework / qiling / tests / test_elf.py View on Github external
def test_syscall_open(ql, open_pathname, open_flags, open_mode, *args):
            target = False
            pathname = ql_read_string(ql, open_pathname)

            if pathname == "test_syscall_open.txt":
                print("test => open(%s, 0x%x, 0%o)" % (pathname, open_flags, open_mode))
                target = True

            syscall.ql_syscall_open(ql, open_pathname, open_flags, open_mode, *args)

            if target:
                real_path = ql_transform_to_real_path(ql, pathname)
                assert os.path.isfile(real_path) == True
                os.remove(real_path)