gabrielsroka / gabrielsroka.github.io

My website, including rockstar: Export Okta Users, Groups, etc. to CSV. Show SAML assertion.
https://gabrielsroka.github.io/
MIT License
89 stars 37 forks source link

Implement "execute" and a few bug fixes #62

Closed asveikau closed 9 months ago

asveikau commented 9 months ago

Hello, I just commented on your HN comment about this.

  1. Use VirtualAlloc on Windows, or mmap(2) on Unix, to ask for executable pages. Otherwise, your process will crash when jumping into the memory buffer.
  2. Implement run by interpreting the memory address as a function pointer and calling it.
  3. While doing this I noticed ChatGPT did not do the hexadecimal parse correctly. Fix that.
  4. Make EOF exit the program gracefully.
gabrielsroka commented 9 months ago

ty for the pr

void (*fn)(void) = (void(*)(void))

i got a D in C in college. i'll stick to Python :)