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
#!/usr/bin/env python3 | |
from pwn import * | |
def find_ra(proc: process, buf_size: int = 1000) -> int: | |
"""Find the offset of the return address on the stack. | |
Args: | |
send_payload: A function that sends the payload to the target. | |
buf_size: The size of the buffer in bytes. |
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
import argparse | |
import re | |
import logging | |
logging.basicConfig( | |
level=logging.INFO, | |
format="[%(levelname)s] %(message)s", | |
) | |
parser = argparse.ArgumentParser( |