-
-
Save theKidOfArcrania/701834f04b48fc3753e54b31d1b9b797 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/mman.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
int main() { | |
int fd = open("crux.patched", 0); | |
off_t size = lseek(fd, 0, SEEK_END); | |
lseek(fd, 0, SEEK_SET); | |
void (*ret)() = mmap(0, 0x6000, 7, MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0); | |
read(fd, (void*)ret, size); | |
// asm volatile ("int3"); | |
ret(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment