I coded this as a quick solution for iexploit. As there are issues with the WAF or forum software replacing code in legit programs with html special characters it's quite annoying to edit by hand.
So let me present my script to do it for you. It's been tested with C++ code. I've also included only a few html special characters and their normal equiv. If you want to expand the hash it's easy. If you struggle give me a buzz and I'll try and help. I've only tried it with one input file so let me know if there are any issues with it. If you don't want to show output just comment out "puts output" and "puts text"
Ruby's really good for compact code, iterating through arrays is really nice. I was going to use Perl but it's feels a tad more bloated than ruby. Thanks though, just a quick solution to the code issue. It works with code such as these:
They were made with the bbcode [code] tags. I don't think bbcode works on here anymore, so when we switched to Vanilla, it probably just stole the formatting straight from the page's previous source.
oh god, talk about doing it the long way round. Ruby or Perl is much more suited to this sort of task then C++ haha. Id love to see an example of that code though, would be a good learning experience.