Automating X11 clipboard content

2022-10-17 By qld

Ahh, Stanford. I'm starting a format string binary now.

The only usefull stuff from today is how to automatically fill your clipboard with a command line, since pwntools native paramiko shell doesn't have a nice interactive fallback, I always end up having code in a window and a shell in another. Middle-click for the win.

p = subprocess.Popen('xsel',stdin=subprocess.PIPE)
p.communicate(bytes(cmd,'ascii'))
p.wait()

No flags were gained today. The story of that buffer overwriting itself gets me confused, especially when the payload size has impacts on offsets (: