Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (2)

Powered by Vanilla. Made with Bootstrap.
HTML Special Character Replacement Tool [Ruby]
  • Sh3llc0d3
    Posts: 1,910
    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"

    Usage: script.rb <input_filename> <input_filename2> ...etc

    http://codepad.org/u5OyvQnO
  • m0rph
    Posts: 332
    This is great! I wasn't expecting your code to be that small. Really man, great job!
    while( !(succeed = try() ) );
  • Sh3llc0d3
    Posts: 1,910
    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:

    http://iexploit.org/index.php?p=/discussion/2837/c-simple-file-crypt
    http://iexploit.org/index.php?p=/discussion/5809/dark-generation-remote-keylogger

    Can you see what method is used in those posts to post the code m0rph? I'm not sure if you'll be able to edit and see the code or not...


  • m0rph
    Posts: 332
    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.
    while( !(succeed = try() ) );
  • Sh3llc0d3
    Posts: 1,910
    Ahh yeah quite possibly. Well eitherway this should work with the old posts xD
  • this looks nice, i personally would have gone for perl but its all personal preference.
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Sh3llc0d3
    Posts: 1,910
    Either or mate, I originally looked at doing it in c/c++ just for the practice etc. I guess its whatever tool does the job.
  • 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.
    Skype: mrpt3o
    Twitter: MrPteo


    image