I've been learning basic buffer overflow exploits from a website; the website has the code in Perl, but as the fact that I'm a Python'er, I was wondering how I could do this! I've been Googling everything I can think of but can't find a solution So here is the original Perl code:

Metasploit, when used by someone who doesn't understand WHY it works, is completely lame.

Just taking a complete shot in the dark here, but it looks like it's having trouble interpreting your variables as strings. I'm not a Python person, but I know a lot of problems in just about any language can be cause by improper variable handling.

Goatboy wrote:Metasploit, when used by someone who doesn't understand WHY it works, is completely lame.

Exactly why I wanted to do it on my own before automating it with Metasploit, thanks.

Goatboy wrote:Just taking a complete shot in the dark here, but it looks like it's having trouble interpreting your variables as strings. I'm not a Python person, but I know a lot of problems in just about any language can be cause by improper variable handling.

This IS the problem I think, but if I properly convert bytes to strings, it can't decode.EDIT:I tried converting the strings to bytes instead of vice-versa, I think the file created properly now

"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."

Hey, the link I provided is about your issue someone else already solved and logged. Better read the link else I will feel bad about all the 1 hour googleing and reading.Click this(Section 15.6.4)(WARNING: BIG WALL OF TEXT!)

Point is, in the transition from 2 to 3, there was a lot more focus on Unicode and encoding and stuff like that, which is pretty much the problem here...The working code (for me) if anyone else has this issue ever was: