Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add memory allocation shortcut and simple variables #2

Open
pothos opened this issue Jun 5, 2023 · 0 comments
Open

Add memory allocation shortcut and simple variables #2

pothos opened this issue Jun 5, 2023 · 0 comments

Comments

@pothos
Copy link

pothos commented Jun 5, 2023

The sus binary is a nice playground to run some syscalls, even from a "script" file.
It would be nice to have a way to run syscalls that require a buffer address.
My current workaround would be to take some random heap or stack address or construct an mmap call which is tedious.
Since the CStrings already land on the heap, it would be nice to also get some way to create such a buffer with a given size and be able to refer to it in other syscalls.
One could think of defining a malloc(X) shortcut that constructs a heap array of bytes with the given size.
Since variables aren't parsed yet, it would be nice to have a way of saying x = mysyscall() and in this case x = malloc(123) and then use the variable x in a following syscall write(2,x,123).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant