(ql: Qiling, pathname: int, argv: int, envp: int, retval: int)
| 79 | # string and not valid code. that causes Qiling to raise an exception, and this is |
| 80 | # why we need a way to thwart those execve failures and end the emulation gracefully |
| 81 | def graceful_execve(ql: Qiling, pathname: int, argv: int, envp: int, retval: int): |
| 82 | assert retval != 0, f'execve is not expected to return on success' |
| 83 | |
| 84 | vpath = ql.os.utils.read_cstring(pathname) |
| 85 | |
| 86 | ql.log.debug(f'failed to call execve("{vpath}"), ending emulation gracefully') |
| 87 | ql.stop() |
| 88 | |
| 89 | |
| 90 | class TestShellcode(unittest.TestCase): |
nothing calls this directly
no test coverage detected