Exploits in Python - manipulating hex strings
Question
I'm quite new to python and trying to port a simple exploit I've written for a stack overflow (just a nop sled, shell code and return address). This isn't for nefarious purposes but rather for a security lecture at a university.
Given a hex string (deadbeef), what are the best ways to:
- represent it as a series of bytes
- add or subtract a value
- reverse the order (for x86 memory layout, i.e. efbeadde)
Any tips and tricks regarding common tasks in exploit writing in python are also greatly appreciated.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow