This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "net" | |
| "os" |
This file contains hidden or 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
| static uint64_t get_next_addr(uint32_t eip) { | |
| uint32_t *ptr = (uint32_t*)(eip - 4); | |
| int offset = (int)(*ptr); | |
| return (offset + eip); | |
| } | |
| uint32_t find_symbol(uint32_t addr) { | |
| int i = symtab.index; | |
| Elf32_Shdr *sections = symtab.sections; |