Skip to content

Instantly share code, notes, and snippets.

@SakiiR
Created August 19, 2019 08:09
Show Gist options
  • Save SakiiR/25770598123972beec9301ba347da4a2 to your computer and use it in GitHub Desktop.
Save SakiiR/25770598123972beec9301ba347da4a2 to your computer and use it in GitHub Desktop.
PWN Cheat Sheet

Pwn SHEET CHEAT

Str to pushes

def str_to_pushs(s):
    ret = []
    for p in reversed([s[i:i+4] for i in range(0, len(s), 4)]):
        p = p[::-1]
        if len(p) != 4:
            p = "\x00"*(4-(len(p) % 4)) +p
        ret.append( "0x{}".format(p.encode("utf-8").hex()))
    return ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment